Upgrade to 3.7.1

This commit is contained in:
Bastian Allgeier
2022-07-12 13:33:21 +02:00
parent 7931eb5e47
commit 1ad1eaf387
377 changed files with 63981 additions and 63824 deletions

View File

@@ -14,86 +14,86 @@ namespace Kirby\Panel;
*/
class Site extends Model
{
/**
* @var \Kirby\Cms\Site
*/
protected $model;
/**
* @var \Kirby\Cms\Site
*/
protected $model;
/**
* Returns the setup for a dropdown option
* which is used in the changes dropdown
* for example.
*
* @return array
*/
public function dropdownOption(): array
{
return [
'icon' => 'home',
'text' => $this->model->title()->value(),
] + parent::dropdownOption();
}
/**
* Returns the setup for a dropdown option
* which is used in the changes dropdown
* for example.
*
* @return array
*/
public function dropdownOption(): array
{
return [
'icon' => 'home',
'text' => $this->model->title()->value(),
] + parent::dropdownOption();
}
/**
* Returns the image file object based on provided query
*
* @internal
* @param string|null $query
* @return \Kirby\Cms\File|\Kirby\Filesystem\Asset|null
*/
protected function imageSource(string $query = null)
{
if ($query === null) {
$query = 'site.image';
}
/**
* Returns the image file object based on provided query
*
* @internal
* @param string|null $query
* @return \Kirby\Cms\File|\Kirby\Filesystem\Asset|null
*/
protected function imageSource(string $query = null)
{
if ($query === null) {
$query = 'site.image';
}
return parent::imageSource($query);
}
return parent::imageSource($query);
}
/**
* Returns the full path without leading slash
*
* @return string
*/
public function path(): string
{
return 'site';
}
/**
* Returns the full path without leading slash
*
* @return string
*/
public function path(): string
{
return 'site';
}
/**
* Returns the data array for the
* view's component props
*
* @internal
*
* @return array
*/
public function props(): array
{
return array_merge(parent::props(), [
'blueprint' => 'site',
'model' => [
'content' => $this->content(),
'link' => $this->url(true),
'previewUrl' => $this->model->previewUrl(),
'title' => $this->model->title()->toString(),
]
]);
}
/**
* Returns the data array for the
* view's component props
*
* @internal
*
* @return array
*/
public function props(): array
{
return array_merge(parent::props(), [
'blueprint' => 'site',
'model' => [
'content' => $this->content(),
'link' => $this->url(true),
'previewUrl' => $this->model->previewUrl(),
'title' => $this->model->title()->toString(),
]
]);
}
/**
* Returns the data array for
* this model's Panel view
*
* @internal
*
* @return array
*/
public function view(): array
{
return [
'component' => 'k-site-view',
'props' => $this->props()
];
}
/**
* Returns the data array for
* this model's Panel view
*
* @internal
*
* @return array
*/
public function view(): array
{
return [
'component' => 'k-site-view',
'props' => $this->props()
];
}
}