mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
Added method Page::initialize()
This commit is contained in:
parent
125f2a8662
commit
1d1c10f0a6
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
1. [](#improved)
|
||||
* Added `route` and `request` to `onPagesInitialized` event
|
||||
* Improved page cloning
|
||||
* Improved page cloning, added method `Page::initialize()`
|
||||
|
||||
# v1.7.24
|
||||
## 10/26/2021
|
||||
|
|
|
|||
|
|
@ -220,10 +220,21 @@ class Page implements PageInterface
|
|||
|
||||
public function __clone()
|
||||
{
|
||||
$this->initialized = false;
|
||||
$this->header = $this->header ? clone $this->header : null;
|
||||
$this->route = null;
|
||||
$this->raw_route = null;
|
||||
$this->_forms = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function initialize(): void
|
||||
{
|
||||
if (!$this->initialized) {
|
||||
$this->initialized = true;
|
||||
$this->route = null;
|
||||
$this->raw_route = null;
|
||||
$this->_forms = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user