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