chapter hgroup + calming decor

This commit is contained in:
Julie Blanc 2026-04-07 18:09:15 +02:00
parent 0545b131de
commit 94d14d70c1
370 changed files with 9583 additions and 1566 deletions

View file

@ -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
*/