update kirby to v5 and add refresh cache panel view button

This commit is contained in:
isUnknown 2025-09-10 14:28:38 +02:00
commit 9a86d41254
466 changed files with 19960 additions and 10497 deletions

View file

@ -2,6 +2,7 @@
use Kirby\Cms\App;
use Kirby\Cms\Blocks;
use Kirby\Cms\Collection;
use Kirby\Cms\File;
use Kirby\Cms\Files;
use Kirby\Cms\Html;
@ -80,7 +81,9 @@ return function (App $app) {
$message .= ' on parent "' . $parent->title() . '"';
}
throw new InvalidArgumentException($message);
throw new InvalidArgumentException(
message: $message
);
}
},
@ -130,6 +133,18 @@ return function (App $app) {
return Str::date($time, $format);
},
/**
* Parse yaml entries data and convert it to a
* collection of field objects
*/
'toEntries' => function (Field $field): Collection {
$entries = new Collection(parent: $field->parent());
foreach ($field->yaml() as $index => $entry) {
$entries->append(new Field($field->parent(), $index, $entry));
}
return $entries;
},
/**
* Returns a file object from a filename in the field
*/
@ -266,7 +281,9 @@ return function (App $app) {
$message .= ' on parent "' . $parent->id() . '"';
}
throw new InvalidArgumentException($message);
throw new InvalidArgumentException(
message: $message
);
}
},