Upgrade to 3.2.5
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use Kirby\Toolkit\I18n;
|
||||
|
||||
return [
|
||||
'props' => [
|
||||
/**
|
||||
@@ -8,5 +10,12 @@ return [
|
||||
'empty' => function ($empty = null) {
|
||||
return I18n::translate($empty, $empty);
|
||||
}
|
||||
],
|
||||
'computed' => [
|
||||
'empty' => function () {
|
||||
if ($this->empty) {
|
||||
return $this->model()->toString($this->empty);
|
||||
}
|
||||
}
|
||||
]
|
||||
];
|
||||
|
@@ -13,7 +13,11 @@ return [
|
||||
],
|
||||
'computed' => [
|
||||
'headline' => function () {
|
||||
return $this->headline ?? ucfirst($this->name);
|
||||
if ($this->headline) {
|
||||
return $this->model()->toString($this->headline);
|
||||
}
|
||||
|
||||
return ucfirst($this->name);
|
||||
}
|
||||
]
|
||||
];
|
||||
|
@@ -10,5 +10,12 @@ return [
|
||||
'help' => function ($help = null) {
|
||||
return I18n::translate($help, $help);
|
||||
}
|
||||
],
|
||||
'computed' => [
|
||||
'help' => function () {
|
||||
if ($this->help) {
|
||||
return $this->model()->toString($this->help);
|
||||
}
|
||||
}
|
||||
]
|
||||
];
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Kirby\Toolkit\Str;
|
||||
use Kirby\Exception\Exception;
|
||||
|
||||
return [
|
||||
'props' => [
|
||||
@@ -22,6 +22,15 @@ return [
|
||||
if (!$parent) {
|
||||
throw new Exception('The parent for the query "' . $query . '" cannot be found in the section "' . $this->name() . '"');
|
||||
}
|
||||
|
||||
if (
|
||||
is_a($parent, 'Kirby\Cms\Page') === false &&
|
||||
is_a($parent, 'Kirby\Cms\Site') === false &&
|
||||
is_a($parent, 'Kirby\Cms\File') === false &&
|
||||
is_a($parent, 'Kirby\Cms\User') === false
|
||||
) {
|
||||
throw new Exception('The parent for the section "' . $this->name() . '" has to be a page, site or user object');
|
||||
}
|
||||
}
|
||||
|
||||
if ($parent === null) {
|
||||
|
Reference in New Issue
Block a user