Upgrade to 4.0.0

This commit is contained in:
Bastian Allgeier
2023-11-28 09:33:56 +01:00
parent f96b96af76
commit 3b0b6546ca
480 changed files with 21371 additions and 13327 deletions

View File

@@ -13,30 +13,18 @@ namespace Kirby\Cms;
*/
class PagePermissions extends ModelPermissions
{
/**
* @var string
*/
protected $category = 'pages';
protected string $category = 'pages';
/**
* @return bool
*/
protected function canChangeSlug(): bool
{
return $this->model->isHomeOrErrorPage() !== true;
}
/**
* @return bool
*/
protected function canChangeStatus(): bool
{
return $this->model->isErrorPage() !== true;
}
/**
* @return bool
*/
protected function canChangeTemplate(): bool
{
if ($this->model->isErrorPage() === true) {
@@ -50,17 +38,16 @@ class PagePermissions extends ModelPermissions
return true;
}
/**
* @return bool
*/
protected function canDelete(): bool
{
return $this->model->isHomeOrErrorPage() !== true;
}
/**
* @return bool
*/
protected function canMove(): bool
{
return $this->model->isHomeOrErrorPage() !== true;
}
protected function canSort(): bool
{
if ($this->model->isErrorPage() === true) {