Skip to content

Kirby 5.0.2

PageRules::delete()

Validates if the page can be deleted

PageRules::delete(Kirby\Cms\Page $page, bool $force = false): void

Parameters

Name Type Default
$pagerequired Kirby\Cms\Page no default value
$force bool false

Exceptions

Type Description
Kirby\Exception\LogicException If the page has children and should not be force-deleted
Kirby\Exception\PermissionException If the user is not allowed to delete the page

Parent class

Kirby\Cms\PageRules