PHP Класс Inpsyde\MultilingualPress\Common\Admin\SettingsPage

С версии: 3.0.0
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( integer $admin, string $title, string $menu_title, string $capability, string $slug, Inpsyde\MultilingualPress\Common\Admin\SettingsPageView $view, string $icon = '', integer | null $position = null ) Constructor. Sets up the properties.
hookname ( ) : string Returns the hookname.
register ( ) : boolean Registers the settings page.
url ( ) : string Returns the full URL.
with_parent ( integer $admin, string $parent, string $title, string $menu_title, string $capability, string $slug, Inpsyde\MultilingualPress\Common\Admin\SettingsPageView $view ) : static Returns a new settings page object, instantiated according to the given arguments.

Приватные методы

Метод Описание
get_action ( ) : string. Returns the action for registering the page.
get_callback ( ) : callable Returns the callback for adding the page to the admin menu.
get_callback_args ( ) : array Returns the callback args for adding the page to the admin menu.

Описание методов

__construct() публичный метод

Constructor. Sets up the properties.
С версии: 3.0.0
public __construct ( integer $admin, string $title, string $menu_title, string $capability, string $slug, Inpsyde\MultilingualPress\Common\Admin\SettingsPageView $view, string $icon = '', integer | null $position = null )
$admin integer Admin type. Use the class constants.
$title string Title on the page itself.
$menu_title string Title in the admin menu.
$capability string Capability required to view the settings page.
$slug string Page slug used in the URL.
$view Inpsyde\MultilingualPress\Common\Admin\SettingsPageView View object.
$icon string Optinoal. Icon URL. Defaults to empty string.
$position integer | null Optional. Position in the admin menu. Defaults to null.

hookname() публичный метод

Returns the hookname.
С версии: 3.0.0
public hookname ( ) : string
Результат string The hookname.

register() публичный метод

Registers the settings page.
С версии: 3.0.0
public register ( ) : boolean
Результат boolean Whether or not the settings page was registered successfully.

url() публичный метод

Returns the full URL.
С версии: 3.0.0
public url ( ) : string
Результат string URL.

with_parent() публичный статический метод

Returns a new settings page object, instantiated according to the given arguments.
С версии: 3.0.0
public static with_parent ( integer $admin, string $parent, string $title, string $menu_title, string $capability, string $slug, Inpsyde\MultilingualPress\Common\Admin\SettingsPageView $view ) : static
$admin integer Admin type. Use the class constants.
$parent string Parent page. Use the available class constants.
$title string Title on the page itself.
$menu_title string Title in the admin menu.
$capability string Capability required to view the settings page.
$slug string Page slug used in the URL.
$view Inpsyde\MultilingualPress\Common\Admin\SettingsPageView View object.
Результат static Settings page object.