function tb_megamenu_export_convert_identifiers in The Better Mega Menu 7
Converts the identifier fields back to their respective "mlid".
Recursively convert the "identifier" fields of the given menu's configuration back to the respective mlid's.
Parameters
array $config: Menu configuration array or subarray.
string $menu_name: Name of the menu the given config belongs to.
1 call to tb_megamenu_export_convert_identifiers()
- tb_megamenu_features_rebuild in ./
tb_megamenu.features.inc - Implements hook_features_rebuild().
File
- ./
tb_megamenu.features.inc, line 180 - Features related functions.
Code
function tb_megamenu_export_convert_identifiers(&$config, $menu_name) {
if (is_array($config)) {
foreach ($config as $key => $value) {
if ($key === 'identifier') {
$config['mlid'] = tb_megamenu_export_identifier_to_mlid($value, $menu_name);
unset($config['identifier']);
}
elseif (is_array($value)) {
tb_megamenu_export_convert_identifiers($config[$key], $menu_name);
}
}
}
}