Upgrade to 3.7.3

This commit is contained in:
Bastian Allgeier
2022-08-10 12:18:04 +02:00
parent fbb8023da4
commit 281090cd87
9 changed files with 125 additions and 83 deletions

View File

@@ -19,17 +19,25 @@ trait HasChildren
/**
* The list of available published children
*
* @var \Kirby\Cms\Pages
* @var \Kirby\Cms\Pages|null
*/
public $children;
/**
* The list of available draft children
*
* @var \Kirby\Cms\Pages
* @var \Kirby\Cms\Pages|null
*/
public $drafts;
/**
* The combined list of available published
* and draft children
*
* @var \Kirby\Cms\Pages|null
*/
public $childrenAndDrafts;
/**
* Returns all published children
*
@@ -51,7 +59,11 @@ trait HasChildren
*/
public function childrenAndDrafts()
{
return $this->children()->merge($this->drafts());
if (is_a($this->childrenAndDrafts, 'Kirby\Cms\Pages') === true) {
return $this->childrenAndDrafts;
}
return $this->childrenAndDrafts = $this->children()->merge($this->drafts());
}
/**