function _menu_views_form_tokens_ui in Menu Views 8.3
Same name and namespace in other branches
- 7.2 menu_views.admin.inc \_menu_views_form_tokens_ui()
Helper function that inserts a fieldset containing available replacement tokens.
See also
1 call to _menu_views_form_tokens_ui()
- _menu_views_form in ./
menu_views.admin.inc - Adds Menu Views settings to an existing form.
File
- ./
menu_views.admin.inc, line 105 - Form hooks for the menu_views module.
Code
function _menu_views_form_tokens_ui(array &$element) {
static $enabled;
if (!isset($enabled)) {
$enabled = module_exists('token');
}
if ($enabled) {
$i = 0;
while (isset($element['tokens_' . $i])) {
$i++;
}
$element['tokens_' . $i] = array(
'#type' => 'container',
);
$element['tokens_' . $i]['tokens'] = array(
'#theme' => 'token_tree',
'#token_types' => array(
'menu-link',
),
'#dialog' => TRUE,
);
}
}