PHP Интерфейс Themosis\Metabox\IMetabox

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

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

Метод Описание
can ( string $capability ) : Themosis\Metabox\IMetabox Define a custom capability to check before adding the metabox.
make ( string $title, string $postType, array $options = [], Illuminate\View\View $view = null ) : Themosis\Metabox\IMetabox Build a metabox instance.
set ( array $fields = [] ) : Themosis\Metabox\IMetabox Register the metabox to WordPress.
validate ( array $rules = [] ) : Themosis\Metabox\IMetabox Define a list of validation rules to execute on metabox fields.
with ( string $key, mixed $value = null ) : Themosis\Metabox\IMetabox Pass custom data to the metabox view.

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

can() публичный Метод

Define a custom capability to check before adding the metabox.
public can ( string $capability ) : Themosis\Metabox\IMetabox
$capability string
Результат Themosis\Metabox\IMetabox

make() публичный Метод

Build a metabox instance.
public make ( string $title, string $postType, array $options = [], Illuminate\View\View $view = null ) : Themosis\Metabox\IMetabox
$title string The metabox title
$postType string The post type name where the metabox is displayed
$options array Metabox parameters (id, context, priority,...)
$view Illuminate\View\View A custom view used by the metabox to render
Результат Themosis\Metabox\IMetabox

set() публичный Метод

Register the metabox to WordPress.
public set ( array $fields = [] ) : Themosis\Metabox\IMetabox
$fields array A list of custom fields to assign.
Результат Themosis\Metabox\IMetabox

validate() публичный Метод

Define a list of validation rules to execute on metabox fields.
public validate ( array $rules = [] ) : Themosis\Metabox\IMetabox
$rules array
Результат Themosis\Metabox\IMetabox

with() публичный Метод

Pass custom data to the metabox view.
public with ( string $key, mixed $value = null ) : Themosis\Metabox\IMetabox
$key string
$value mixed
Результат Themosis\Metabox\IMetabox