Upgrade to 3.6.0

This commit is contained in:
Bastian Allgeier
2021-11-16 14:53:37 +01:00
parent 7388fa4d24
commit 92b7a330fa
318 changed files with 20017 additions and 6878 deletions

View File

@@ -0,0 +1,55 @@
<?php
use Kirby\Toolkit\Escape;
return [
'pages' => [
'label' => t('pages'),
'icon' => 'page',
'query' => function (string $query = null) {
$pages = site()
->index(true)
->search($query)
->filter('isReadable', true)
->limit(10);
$results = [];
foreach ($pages as $page) {
$results[] = [
'image' => $page->panel()->image(),
'text' => Escape::html($page->title()->value()),
'link' => $page->panel()->url(true),
'info' => Escape::html($page->id())
];
}
return $results;
}
],
'files' => [
'label' => t('files'),
'icon' => 'image',
'query' => function (string $query = null) {
$files = site()
->index(true)
->filter('isReadable', true)
->files()
->search($query)
->limit(10);
$results = [];
foreach ($files as $file) {
$results[] = [
'image' => $file->panel()->image(),
'text' => Escape::html($file->filename()),
'link' => $file->panel()->url(true),
'info' => Escape::html($file->id())
];
}
return $results;
}
]
];