Свойство | Type | Description | |
---|---|---|---|
$add_to_prefix | boolean | If false, Fieldmanager will not check for collisions among the meta keys created for this group's fields and other registered fields. | |
$children | Fieldmanager_Field[] | Children elements of this group. Not much point in creating an empty group. | |
$collapsed | boolean | If true, this group is collapsed by default. | |
$collapsible | boolean | If true, this group can be collapsed by clicking its header. | |
$field_class | string | Override field class | |
$group_is_empty | callable | null | Function that tells whether the group is empty or not. Gets an array of form values. | |
$has_unserialized_descendants | boolean | This field is set based on its descendants, but you can deliberately set it yourself if your situation is one where this cannot be determined automatically (for instance, where descendants are added after the group has been constructed). | |
$label_element | string | Override label element | |
$label_format | string | If specified, $label_format combined with $label_token will override $label, but only if $(label).find(label_token).val() is not null. | |
$label_macro | array | Label macro is a more convenient shortcut to label_format and label_token. The first element of the two-element array is the title with a placeholder (%s), and the second element is simply the name of the child element to pull from, e.g.: array( 'Section: %s', 'section_title' ) | |
$label_token | string | CSS selector to an element to get the token for the label format | |
$persist_active_tab | boolean | Persist the active tab on the group between sessions | |
$tab_limit | integer | How many tabs, maximum? | |
$tabbed | boolean | string | Use tabbed groups. Currently supports "horizontal" or "vertical". Default is false, which means that the group will not be tabbed. |
Свойство | Type | Description | |
---|---|---|---|
$child_count | boolean | Iterator value for how many children we have rendered. |
Méthode | Description | |
---|---|---|
__construct ( $label = '', $options = [] ) | Constructor; add CSS if we're looking at a tabbed view | |
add_child ( Fieldmanager_Field $child ) : void | Add a child element to this group. | |
form_element ( mixed $value = NULL ) | Render the element, iterating over children and calling their form_element() functions. | |
get_element_label ( array $classes = [] ) : string | Get an HTML label for this element. | |
get_extra_element_classes ( ) : array | Maybe add the collapsible class for groups | |
presave ( $values, $current_values = [] ) : mixed[] | Presave override for groups which dispatches to child presave_all methods. | |
wrap_with_multi_tools ( string $html, $classes = [] ) : string | Groups have their own drag and remove tools in the label. |
Méthode | Description | |
---|---|---|
add_meta_boxes_to_remove ( &$meta_boxes_to_remove ) : array | Helper function to get the list of default meta boxes to remove. |
public __construct ( $label = '', $options = [] ) |
protected add_meta_boxes_to_remove ( &$meta_boxes_to_remove ) : array | ||
$meta_boxes_to_remove | the array of meta boxes to remove | |
Résultat | array | list of meta boxes to remove |
public form_element ( mixed $value = NULL ) | ||
$value | mixed |
public get_element_label ( array $classes = [] ) : string | ||
$classes | array | extra CSS classes. |
Résultat | string | HTML label. |
public get_extra_element_classes ( ) : array | ||
Résultat | array |
public presave ( $values, $current_values = [] ) : mixed[] | ||
Résultat | mixed[] | values |
public wrap_with_multi_tools ( string $html, $classes = [] ) : string | ||
$html | string | |
Résultat | string |
public bool $add_to_prefix | ||
Résultat | boolean |
protected bool $child_count | ||
Résultat | boolean |
public Fieldmanager_Field[] $children | ||
Résultat | Fieldmanager_Field[] |
public bool $collapsed | ||
Résultat | boolean |
public bool $collapsible | ||
Résultat | boolean |
public bool $has_unserialized_descendants | ||
Résultat | boolean |
public string $label_element | ||
Résultat | string |
public string $label_format | ||
Résultat | string |
public array $label_macro | ||
Résultat | array |
public string $label_token | ||
Résultat | string |
public bool $persist_active_tab | ||
Résultat | boolean |