Свойство | Тип | Описание | |
---|---|---|---|
$action | Themosis\Hook\IHook | ||
$datas | The page properties. | ||
$sections | array | The page sections. | |
$settings | array | The page settings. | |
$validator | The page validator object. | ||
$view | Illuminate\View\View | The page view file. |
Метод | Описание | |
---|---|---|
__construct ( |
Build a Page instance. | |
addSections ( array $sections = [] ) : |
Add custom sections for your settings. | |
addSettings ( array $settings = [] ) : |
Add settings to the page. Define settings per section by setting the 'key' name equal to a registered section and pass it an array of 'settings' fields. | |
build ( ) | Triggered by the 'admin_menu' action event. | |
displayPage ( ) | Triggered by the 'add_menu_page' or 'add_submenu_page'. | |
displaySections ( array $args ) | Handle section display of the Settings API. | |
displaySettings ( mixed $setting ) | Handle setting display of the Settings API. | |
enqueueMediaUploader ( ) | Enqueue the WordPress media scripts. | |
get ( string $property = null ) : mixed | Return a page property value. | |
hasSections ( ) : boolean | Check if the page has sections. | |
installSettings ( ) | Triggered by the 'admin_init' action. | |
make ( string $slug, string $title, string $parent = null, Illuminate\View\View $view = null ) : |
||
renderSettings ( ) | Helper method that output the page settings. | |
renderTabs ( ) | Helper method that output the tab navigation if available. | |
set ( array $params = [] ) : |
Set the custom page. Allow user to override the default page properties and add its own properties. | |
validate ( array $rules = [] ) : |
Set validation rules to settings. | |
validateSettings ( mixed $values ) : array | Validate the defined settings. | |
with ( string | array $key, mixed $value = null ) : |
Allow a user to pass custom datas to the page view instance. |
Метод | Описание | |
---|---|---|
getActiveTab ( ) : string | Return the active tab slug of the settings page. | |
installWithTabs ( ) | Register sections and settings in order to work with tabs. | |
installWithoutTabs ( ) | Register sections and settings in a page. | |
isInfinite ( string $name ) : boolean | Check if a field/settings is of type 'infinite'. | |
setTabUri ( string $default ) : string | Define the tab URI. Check for extra query parameters. |
public __construct ( |
||
$datas | The page properties. | |
$view | Illuminate\View\View | The page view file. |
$validator | The page validator. | |
$action | Themosis\Hook\IHook | The Action builder class. |
public addSections ( array $sections = [] ) : |
||
$sections | array | |
Результат |
public addSettings ( array $settings = [] ) : |
||
$settings | array | The page settings. |
Результат |
public displayPage ( ) |
public displaySections ( array $args ) | ||
$args | array |
public displaySettings ( mixed $setting ) | ||
$setting | mixed |
public enqueueMediaUploader ( ) |
protected getActiveTab ( ) : string | ||
Результат | string |
public hasSections ( ) : boolean | ||
Результат | boolean |
protected installWithTabs ( ) |
protected installWithoutTabs ( ) |
protected isInfinite ( string $name ) : boolean | ||
$name | string | The name of the field/setting. |
Результат | boolean |
public make ( string $slug, string $title, string $parent = null, Illuminate\View\View $view = null ) : |
||
$slug | string | The page slug name. |
$title | string | The page display title. |
$parent | string | The parent's page slug if a subpage. |
$view | Illuminate\View\View | The page main view file. |
Результат |
public renderSettings ( ) |
public renderTabs ( ) |
public validateSettings ( mixed $values ) : array | ||
$values | mixed | |
Результат | array |
protected DataContainer,Themosis\Foundation $datas | ||
Результат |
protected ValidationBuilder,Themosis\Validation $validator | ||
Результат |