You are here

function _ctools_menu_add_dynamic_items in Chaos Tool Suite (ctools) 6

Same name and namespace in other branches
  1. 7 includes/menu.inc \_ctools_menu_add_dynamic_items()
1 call to _ctools_menu_add_dynamic_items()
ctools_menu_local_tasks in includes/menu.inc
CTools' variant of menu_local_tasks.

File

includes/menu.inc, line 487
General menu helper functions.

Code

function _ctools_menu_add_dynamic_items(&$links) {

  // TESTING: add hardcoded values.
  if ($additions = ctools_menu_add_tab()) {
    foreach ($additions as $addition) {
      $links[$addition['href']] = $addition + array(
        'access' => TRUE,
        'type' => MENU_LOCAL_TASK,
      );
    }
    uasort($links, 'ctools_menu_sort');
  }
}