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 |