];
$form['menu'
]['expanded'
] =
[ '#title' =>
$this->
t('Show as expanded'
),
'#type' => 'checkbox',
'#default_value' => !
empty($menu['expanded'
]),
'#description' =>
$this->
t('If selected and this menu link has children, the menu will always appear expanded.'
),
];
$menu_parent =
$menu['menu_name'
] . ':' .
$menu['parent'
];
$menu_link = 'views_view:views.' .
$form_state->
get('view'
)->
id() . '.' .
$form_state->
get('display_id'
);
$form['menu'
]['parent'
] =
$this->parentFormSelector->
parentSelectElement($menu_parent,
$menu_link);
$form['menu'
]['parent'
] +=
[ '#title' =>
$this->
t('Parent'
),
'#description' =>
$this->
t('The maximum depth for a link and all its children is fixed. Some menu links may not be available as parents if selecting them would exceed this limit.'
),
'#attributes' =>
['class' =>
['menu-title-select'
]],
'#states' =>
[ 'visible' =>
[ [ ':input[name="menu[type]"]' =>
['value' => 'normal'
],
],
[ ':input[name="menu[type]"]' =>
['value' => 'tab'
],
],