Upgrade to 4.4.0

This commit is contained in:
Bastian Allgeier
2024-09-12 14:43:02 +02:00
parent a955c7822e
commit 8bc7250b68
87 changed files with 637 additions and 352 deletions

View File

@@ -5,6 +5,8 @@ use Kirby\Cms\Find;
use Kirby\Toolkit\I18n;
return [
// @codeCoverageIgnoreStart
// TODO: move to controller class and add unit tests
'tree' => [
'pattern' => 'site/tree',
'action' => function () {
@@ -62,5 +64,20 @@ return [
return $pages;
}
],
'tree.parents' => [
'pattern' => 'site/tree/parents',
'action' => function () {
$kirby = App::instance();
$request = $kirby->request();
$page = $kirby->page($request->get('page'));
return [
'data' => $page->parents()->flip()->values(
fn ($parent) => $parent->uuid()?->toString() ?? $parent->id()
)
];
}
]
// @codeCoverageIgnoreEnd
];