FileRules::changeTemplate()
Validates if the template of the file can be changed
FileRules::changeTemplate(Kirby\Cms\File $file, string $template): void
Parameters
| Name | Type | Default |
|---|---|---|
| $filerequired | Kirby\Cms\File |
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 |