menu_node_edit_get_sections

Versions
menu_node_edit
menu_node_edit_get_sections($mlid = NULL)

Load the sections defined by the module.

Parameters

$mlid An optional menu link id to pass, which will limit the return data to verify the requested menu link id.

Return value

An array of section-enabled mlids, where key and value are both the mlid.

▾ 3 functions call menu_node_edit_get_sections()

menu_node_edit_check_rules in ./menu_node_edit.module
Determine if this node is a menu item that is subject to our rules.
menu_node_edit_get_options in ./menu_node_edit.module
Load the section options for forms.
menu_node_edit_overview_form_submit in ./menu_node_edit.module
Custom submit handler for menu overview form.

Code

./menu_node_edit.module, line 183

<?php
function menu_node_edit_get_sections($mlid = NULL) {
  static $sections;
  if (!isset($sections)) {
    $sections = array();
    $result = db_query("SELECT mlid FROM {menu_node_edit}");
    while ($data = db_fetch_object($result)) {
      $sections[$data->mlid] = $data->mlid;
    }
  }
  if (!empty($mlid)) {
    return isset($sections[$mlid]) ? $sections[$mlid] : array();
  }
  return $sections;
}
?>

Contact

  • agentrickard [at] gmail [dot] com

Donations

My Amazon.com Wish List