PageRules::changeTemplate()
Validates if the template of the page can be changed
PageRules::changeTemplate(Kirby\Cms\Page $page, string $template): void
Parameters
| Name | Type | Default |
|---|---|---|
| $pagerequired | Kirby\Cms\Page |
no default value |
| $templaterequired | string |
no default value |
Exceptions
| Type | Description |
|---|---|
Kirby\Exception\LogicException |
If the template of the page cannot be changed at all |
Kirby\Exception\PermissionException |
If the user is not allowed to change the template |