public static function CshsElement::option in Client-side Hierarchical Select 8.2
Returns the `cshs` option structure.
Parameters
string $name: The value.
int|string $parent: The parent.
Return value
array The option structure.
See also
formatOptions()
3 calls to CshsElement::option()
- CshsElement::formatOptions in src/
Element/ CshsElement.php - CshsOptionsFromHelper::getOptions in src/
CshsOptionsFromHelper.php - Collects the options.
- cshs_menu_link_form_node_form_alter in modules/
cshs_menu_link/ cshs_menu_link.module - Implements hook_form_BASE_FORM_ID_alter().
File
- src/
Element/ CshsElement.php, line 60
Class
- CshsElement
- Defines the CSHS element.
Namespace
Drupal\cshs\ElementCode
public static function option(string $name, $parent = 0) : array {
\assert(\is_numeric($parent) || \is_string($parent), $name);
return [
'name' => $name,
'parent_tid' => $parent,
];
}