menu_node_edit_get_options

Versions
menu_node_edit
menu_node_edit_get_options()

Load the section options for forms.

Return value

An array of possible sub-items taken from a section.

Code

./menu_node_edit.module, line 731

<?php
function menu_node_edit_get_options() {
  static $options;
  if (!isset($options)) {
    // We might as well cache this.
    $cid = 'menu-access-options';
    $data = cache_get($cid);
    if (!empty($data->data)) {
      $options = $data->data;
      return $options;
    }
    $menus = menu_node_edit_menu_options(TRUE);
    $sections = menu_node_edit_get_sections();
    foreach ($menus as $key => $value) {
      $tree = menu_tree_all_data($key);
      $options[$key] = menu_node_tree($tree, NULL, $sections);
    }
    cache_set($cid, $options);
  }
  return $options;
}
?>

Contact

  • agentrickard [at] gmail [dot] com

Donations

My Amazon.com Wish List