This commit is contained in:
2021-12-06 13:54:48 +01:00
parent cfd6acbbb8
commit f5cb936c97
111 changed files with 2189 additions and 858 deletions

View File

@@ -218,6 +218,25 @@ class Page implements PageInterface
return $this;
}
public function __clone()
{
$this->initialized = false;
$this->header = $this->header ? clone $this->header : null;
}
/**
* @return void
*/
public function initialize(): void
{
if (!$this->initialized) {
$this->initialized = true;
$this->route = null;
$this->raw_route = null;
$this->_forms = null;
}
}
/**
* @return void
*/
@@ -975,7 +994,7 @@ class Page implements PageInterface
/**
* Needed by the onPageContentProcessed event to set the raw page content
*
* @param string $content
* @param string|null $content
* @return void
*/
public function setRawContent($content)
@@ -2274,11 +2293,11 @@ class Page implements PageInterface
{
if ($var !== null) {
// make sure first level are arrays
array_walk($var, function (&$value) {
array_walk($var, static function (&$value) {
$value = (array) $value;
});
// make sure all values are strings
array_walk_recursive($var, function (&$value) {
array_walk_recursive($var, static function (&$value) {
$value = (string) $value;
});
$this->taxonomy = $var;