Is the given field name editable?
This provides the implementation for the Page::fieldEditable($field) method.
Usage
// basic usage
$bool = $pagePermissions->fieldEditable(Page $page, $name);
// usage with all arguments
$bool = $pagePermissions->fieldEditable(Page $page, $name, bool $checkPageEditable = true);
Arguments
Name | Type(s) | Description |
---|---|---|
page | Page | |
name | string, Field | Field name |
checkPageEditable (optional) | bool | Check if the page is editable? Default=true. Specify false here as an optimization if you've already confirmed $page is editable. |
Return value
bool
PagePermissions methods and properties
API reference based on ProcessWire core version 3.0.244