Upgrade to 4.4.0
This commit is contained in:
@@ -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
|
||||
];
|
||||
|
Reference in New Issue
Block a user