Documentation

SubMenuPage
in package
uses NormalizesCapability

Read onlyYes
FinalYes

Immutable description of one wp-admin submenu entry.

slugSuffix is appended to the component name by the registrar to form the page slug ({component}-{suffix}). routeBase is the path this submenu dispatches to when no explicit ?route is present. A null capability inherits the parent MenuPage capability.

Table of Contents

Properties

$capability  : string|null
Capability required to access the submenu, or null to inherit the parent {@see MenuPage} capability (normalized to a plain string when set).
$menuTitle  : string
$pageTitle  : string
$routeBase  : string
$slugSuffix  : string

Methods

__construct()  : mixed

Properties

$capability

Capability required to access the submenu, or null to inherit the parent {@see MenuPage} capability (normalized to a plain string when set).

public string|null $capability

Methods

__construct()

public __construct(string $slugSuffix, string $pageTitle, string $menuTitle[, string $routeBase = '/' ][, null|CapabilityInterface|string $capability = null ]) : mixed
Parameters
$slugSuffix : string
$pageTitle : string
$menuTitle : string
$routeBase : string = '/'
$capability : null|CapabilityInterface|string = null

raw string, typed capability, or null to inherit

On this page

Search results