function _menu_router_save


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 _menu_router_save($menu, $masks)
cle7 _menu_router_save($menu, $masks)
elmsmedia7 _menu_router_save($menu, $masks)
icor7 _menu_router_save($menu, $masks)
meedjum_blog7 _menu_router_save($menu, $masks)
mooc7 _menu_router_save($menu, $masks)

Saves data from menu_router_build() to the router table.

Related topics

1 call to _menu_router_save()
menu_rebuild in includes/
Populates the database tables used by various menu functions.


includes/, line 3772
API for the Drupal menu system.


function _menu_router_save($menu, $masks) {
  // Delete the existing router since we have some data to replace it.

  // Prepare insert object.
  $insert = db_insert('menu_router')->fields(array(

  $num_records = 0;

  foreach ($menu as $path => $item) {
    // Fill in insert object values.
      'path' => $item['path'],
      'load_functions' => $item['load_functions'],
      'to_arg_functions' => $item['to_arg_functions'],
      'access_callback' => $item['access callback'],
      'access_arguments' => serialize($item['access arguments']),
      'page_callback' => $item['page callback'],
      'page_arguments' => serialize($item['page arguments']),
      'delivery_callback' => $item['delivery callback'],
      'fit' => $item['_fit'],
      'number_parts' => $item['_number_parts'],
      'context' => $item['context'],
      'tab_parent' => $item['tab_parent'],
      'tab_root' => $item['tab_root'],
      'title' => $item['title'],
      'title_callback' => $item['title callback'],
      'title_arguments' => ($item['title arguments'] ? serialize($item['title arguments']) : ''),
      'theme_callback' => $item['theme callback'],
      'theme_arguments' => serialize($item['theme arguments']),
      'type' => $item['type'],
      'description' => $item['description'],
      'position' => $item['position'],
      'weight' => $item['weight'],
      'include_file' => $item['include file'],

    // Execute in batches to avoid the memory overhead of all of those records
    // in the query object.
    if (++$num_records == 20) {
      $num_records = 0;
  // Insert any remaining records.
  // Store the masks.
  variable_set('menu_masks', $masks);

  return $menu;