MetaBoxGroup
extends InputGroup
in package
Table of Contents
- $context : mixed
- $fields : array<string|int, InputField>
- $label : mixed
- $name : mixed
- $postId : mixed
- $postType : mixed
- $priority : mixed
- $atts : mixed
- __construct() : mixed
- addField() : mixed
- addFields() : mixed
- getAttsFromRequest() : mixed
- getFieldByName() : InputField|null
- getFields() : array<string|int, InputField>
- getIndexByName() : int
- getLabel() : mixed
- getName() : mixed
- getPostId() : mixed
- getValues() : array<string|int, mixed>
- hasField() : bool
- hasTranslatableFields() : bool
- insertField() : mixed
- isValidRequest() : bool
- register() : mixed
- removeField() : bool
- render() : mixed
- save() : bool
- setName() : mixed
- setPostId() : mixed
- renderFullWideTableMetaBox() : mixed
- renderRegularMetaBox() : mixed
- renderSideMetaBox() : mixed
Properties
$context
protected
mixed
$context
$fields
protected
array<string|int, InputField>
$fields
= array()
$label
protected
mixed
$label
$name
protected
mixed
$name
$postId
protected
mixed
$postId
$postType
protected
mixed
$postType
$priority
protected
mixed
$priority
$atts
private
mixed
$atts
Methods
__construct()
public
__construct(string $name, string $label, string $postType[, string $context = 'advanced' ][, string $priority = 'default' ][, array<string|int, mixed> $atts = array() ]) : mixed
Parameters
- $name : string
- $label : string
- $postType : string
- $context : string = 'advanced'
-
Optional. The context within the screen where the boxes should display ('normal', 'side', and 'advanced'). Default: 'advanced'
- $priority : string = 'default'
-
Optional. The priority within the context where the boxes should show ('high', 'default', 'low'). Default: 'default'
- $atts : array<string|int, mixed> = array()
-
Optional. Additional attributes for rendering.
Tags
Return values
mixed —addField()
public
addField(InputField $field) : mixed
Parameters
- $field : InputField
Return values
mixed —addFields()
public
addFields(array<string|int, InputField> $fields) : mixed
Parameters
- $fields : array<string|int, InputField>
Return values
mixed —getAttsFromRequest()
public
getAttsFromRequest([mixed $request = null ][, mixed $allowReadonly = true ]) : mixed
Parameters
- $request : mixed = null
- $allowReadonly : mixed = true
Return values
mixed —getFieldByName()
public
getFieldByName(string $name) : InputField|null
Parameters
- $name : string
Return values
InputField|null —Searched field or null if nothing found.
getFields()
public
getFields() : array<string|int, InputField>
Return values
array<string|int, InputField> —getIndexByName()
public
getIndexByName(string $name) : int
Parameters
- $name : string
Return values
int —Field index or -1 if nothing found.
getLabel()
public
getLabel() : mixed
Return values
mixed —getName()
public
getName() : mixed
Return values
mixed —getPostId()
public
getPostId() : mixed
Return values
mixed —getValues()
public
getValues() : array<string|int, mixed>
Return values
array<string|int, mixed> —hasField()
public
hasField(string $name) : bool
Parameters
- $name : string
Tags
Return values
bool —hasTranslatableFields()
public
hasTranslatableFields() : bool
Return values
bool —insertField()
public
insertField(InputField $field, int $index) : mixed
Parameters
- $field : InputField
- $index : int
Return values
mixed —isValidRequest()
public
isValidRequest() : bool
Return values
bool —register()
public
register() : mixed
Return values
mixed —removeField()
public
removeField(int|string $key) : bool
Parameters
- $key : int|string
-
Field index or name.
Return values
bool —true if removed, false - otherwise
render()
public
render() : mixed
Return values
mixed —save()
public
save() : bool
Tags
Return values
bool —setName()
public
setName(mixed $name) : mixed
Parameters
- $name : mixed
Return values
mixed —setPostId()
public
setPostId(mixed $postId) : mixed
Parameters
- $postId : mixed
Return values
mixed —renderFullWideTableMetaBox()
private
renderFullWideTableMetaBox() : mixed
Tags
Return values
mixed —renderRegularMetaBox()
private
renderRegularMetaBox() : mixed
Return values
mixed —renderSideMetaBox()
private
renderSideMetaBox() : mixed