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