function domain_conf_get_menu_parents in Domain Access 7.2
Same name and namespace in other branches
- 7.3 domain_conf/domain_conf.domain.inc \domain_conf_get_menu_parents()
Form process function to load available menus.
If we try to load the menus in the batch hook, it can create a race condition with menu_rebuild() that leads to a fatal call stack error.
So we use this process callback to populate the menus safely, after they have been rebuilt.
1 string reference to 'domain_conf_get_menu_parents'
- domain_conf_domainbatch in domain_conf/
domain_conf.module - Implements hook_domainbatch()
File
- domain_conf/
domain_conf.module, line 517 - Domain manager configuration options.
Code
function domain_conf_get_menu_parents($element, &$form_state) {
static $options;
if (!isset($options)) {
$options = menu_parent_options(menu_get_menus(), array(
'mlid' => 0,
));
}
$element['#options'] += $options;
return $element;
}