PagePermissions::userViewable()

Returns whether the given page ($page) is viewable by the current user

Usage

// basic usage
$bool = $pagePermissions->userViewable(Page $page);

// usage with all arguments
$bool = $pagePermissions->userViewable(Page $page, array $options = []);

Arguments

NameType(s)Description
$pagePage
$options (optional)array
  • processName (string): Name of Process module to consider for context. 3.0.244+ Default:''

Return value

bool

Exceptions

Method can throw exceptions on error:

  • WireException


PagePermissions methods and properties

API reference based on ProcessWire core version 3.0.253