Documentation

MenuPage
in package
uses NormalizesCapability

Read onlyYes
FinalYes

Immutable description of the top-level wp-admin menu entry an {@see AdminRouteRegistrar} registers.

The menu slug is NOT stored here — it is derived from the host component name by the registrar, so the brand never appears as a literal. routeBase is the path this page dispatches to when no explicit ?route is present.

Table of Contents

Properties

$capability  : string
Capability required to access the page (normalized to a plain string).
$icon  : string
$menuTitle  : string
$pageTitle  : string
$position  : int|null
$routeBase  : string

Methods

__construct()  : mixed

Properties

$capability

Capability required to access the page (normalized to a plain string).

public string $capability

$position

public int|null $position = null

$routeBase

public string $routeBase = '/'

Methods

__construct()

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

raw string or typed capability

$icon : string = ''
$position : int|null = null
$routeBase : string = '/'
On this page

Search results