You are here

function configuration_check_menu_links in Configuration Management 7

1 call to configuration_check_menu_links()
configuration_menu_link_update in observers/observer.menu.inc
Implements hook_menu_link_update().

File

includes/configuration.menu.inc, line 317

Code

function configuration_check_menu_links($identifier) {

  // Get static variable that we can access across this request.
  $from_activestore =& drupal_static('configuration_from_activestore');
  $component = 'menu_links';
  if (file_exists("config://configuration.menu_links.inc")) {

    // Load the current configuration file on disk
    include_once drupal_realpath("config://configuration.menu_links.inc");

    // Export just the field we're tracking.
    module_load_include('inc', 'configuration', "configuration.export");

    // Export the field we just saved and evaluate the export to $fields
    $code = menu_links_configuration_export_render('configuration', array(
      $identifier,
    ));
    eval(array_pop($code));
    $menu_links_code = configuration_menu_default_menu_links();

    // If the activestore doesn't exist it is most likely because this configuration
    // only exists in code.
    if (empty($menu_links)) {
      configuration_set_status($component, $identifier, CONFIGURATION_TRACKED_DATASTORE_ONLY);
    }
    configuration_update_component_status($component, $identifier, $menu_links, $menu_links_code, $from_activestore);
  }
}