PagePermissions::viewable() method

Hook for Page::viewable() or Page::viewable($user) method

Is the page viewable by the current user? (or specified user)

  • Optionally specify User object to hook as first argument to check for a specific User.
  • Optionally specify a field name (or Field object) as first argument to check for specific field.
  • Optionally specify Language object or language name as first argument to check if viewable in that language (requires LanguageSupportPageNames module).
  • Optionally specify boolean false as first or second argument to bypass template filename check.

Usage

$pagePermissions->viewable(HookEvent $event);

Arguments

NameType(s)Description
eventHookEvent

PagePermissions methods and properties

API reference based on ProcessWire core version 3.0.163

Twitter updates

  • Quick weekly update covering this week's commits for the upcoming 3.0.167 ProcessWire core version— More
    18 September 2020
  • This week ProcessWire version 3.0.166 is released on the dev branch. In this post we’ll cover all that’s new relative to the previous version, 3.0.165. Plus we’ll check out the latest new versions of ProCache and FormBuilder— More
    11 September 2020
  • Weekly update – 28 August 2020 – New secure files option defined per-template: More
    28 August 2020

Latest news

  • ProcessWire Weekly #332
    In the 332nd issue of ProcessWire Weekly we'll cover the latest core updates, introduce some new and updated ProcessWire resources, and more. Read on!
    Weekly.pw / 19 September 2020
  • ProcessWire 3.0.166 core updates and more
    This week ProcessWire version 3.0.166 is released on the dev branch. In this post we’ll cover all that’s new relative to the previous version, 3.0.165. Plus we’ll check out the latest new versions of ProCache and FormBuilder.
    Blog / 11 September 2020
  • Subscribe to weekly ProcessWire news

“…building with ProcessWire was a breeze, I really love all the flexibility the system provides. I can’t imagine using any other CMS in the future.” —Thomas Aull