1 system.theme.inc theme_token_tree($variables)

Provide a 'tree' display of nested tokens.

Related topics

File

core/modules/system/system.theme.inc, line 613
Theme functions for the System module.

Code

function theme_token_tree($variables) {
  if (!empty($variables['dialog'])) {
    return theme('token_tree_link', $variables);
  }
  module_load_include('inc', 'system', 'system.pages');
  $content = system_token_browser_tree_build_content($variables['token_types'], $variables['global_types'], $variables['show_restricted']);
  // Create a security token.
  $settings['tokenBrowser'] = array(
    'token' => backdrop_get_token('token-browser-endpoint'),
    'restricted' => $variables['show_restricted'],
    'click_insert' => $variables['click_insert'],
  );
  backdrop_add_js($settings, 'setting');

  return backdrop_render($content);
}