chapter hgroup + calming decor
This commit is contained in:
parent
0545b131de
commit
94d14d70c1
370 changed files with 9583 additions and 1566 deletions
|
|
@ -25,6 +25,25 @@ class PageUuid extends ModelUuid
|
|||
*/
|
||||
public Identifiable|null $model = null;
|
||||
|
||||
/**
|
||||
* Removes the current UUID from cache,
|
||||
* recursively including all children if needed
|
||||
*/
|
||||
public function clear(bool $recursive = false): bool
|
||||
{
|
||||
/**
|
||||
* If $recursive, also clear UUIDs from cache for all children
|
||||
* @var \Kirby\Cms\Page $model
|
||||
*/
|
||||
if ($recursive === true && $model = $this->model()) {
|
||||
foreach ($model->children() as $child) {
|
||||
$child->uuid()->clear(true);
|
||||
}
|
||||
}
|
||||
|
||||
return parent::clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* Looks up UUID in cache and resolves
|
||||
* to page object
|
||||
|
|
@ -55,6 +74,27 @@ class PageUuid extends ModelUuid
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Feeds the UUID for the page (and optionally
|
||||
* its children) into the cache
|
||||
*/
|
||||
public function populate(
|
||||
bool $force = false,
|
||||
bool $recursive = false
|
||||
): bool {
|
||||
/**
|
||||
* If $recursive, also populate UUIDs for all children
|
||||
* @var \Kirby\Cms\Page $model
|
||||
*/
|
||||
if ($recursive === true && $model = $this->model()) {
|
||||
foreach ($model->children() as $child) {
|
||||
$child->uuid()->populate($force, true);
|
||||
}
|
||||
}
|
||||
|
||||
return parent::populate($force);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns permalink url
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue