public function MenuSelectTree::getInfo in Menu Select 2.0.x
Same name and namespace in other branches
- 8 src/Element/MenuSelectTree.php \Drupal\menu_select\Element\MenuSelectTree::getInfo()
Returns the element properties for this element.
Return value
array An array of element properties. See \Drupal\Core\Render\ElementInfoManagerInterface::getInfo() for documentation of the standard properties of all elements, and the return value format.
Overrides ElementInterface::getInfo
File
- src/
Element/ MenuSelectTree.php, line 19
Class
- MenuSelectTree
- A form element for the select tree.
Namespace
Drupal\menu_select\ElementCode
public function getInfo() {
return [
'#menu_parent' => NULL,
'#menus' => [],
'#current_link_id' => NULL,
'#max_depth' => NULL,
'#process' => [
[
static::class,
'processElement',
],
],
'#element_validate' => [
[
static::class,
'validateMenuSelectTree',
],
],
'#attached' => [
'library' => [
'menu_select/menu_select',
],
],
'#tree' => TRUE,
'tree' => [
'#type' => 'container',
'#attributes' => [
'class' => [
'js-menu-select-tree',
],
],
'menu_parent_id' => [
'#type' => 'hidden',
'#attributes' => [
'class' => [
'js-menu-select-tree-parent-id',
],
],
],
],
];
}