1
0

downgrade to kirby v3

This commit is contained in:
Philip Wagner
2024-09-01 10:47:15 +02:00
parent a4b2aece7b
commit af86acb7a1
1085 changed files with 54743 additions and 65042 deletions

View File

@@ -1,6 +1,5 @@
<?php
use Kirby\Cms\ModelWithContent;
use Kirby\Data\Data;
use Kirby\Toolkit\A;
@@ -35,13 +34,7 @@ return [
],
'computed' => [
'parentModel' => function () {
if (
is_string($this->parent) === true &&
$model = $this->model()->query(
$this->parent,
ModelWithContent::class
)
) {
if (is_string($this->parent) === true && $model = $this->model()->query($this->parent, 'Kirby\Cms\Model')) {
return $model;
}
@@ -75,13 +68,10 @@ return [
foreach (Data::decode($value, 'yaml') as $id) {
if (is_array($id) === true) {
$id = $id['uuid'] ?? $id['id'] ?? null;
$id = $id['id'] ?? null;
}
if (
$id !== null &&
($file = $this->kirby()->file($id, $this->model()))
) {
if ($id !== null && ($file = $this->kirby()->file($id, $this->model()))) {
$files[] = $this->fileResponse($file);
}
}
@@ -132,7 +122,7 @@ return [
];
},
'save' => function ($value = null) {
return A::pluck($value, $this->store);
return A::pluck($value, 'uuid');
},
'validations' => [
'max',