function coder_upgrade_convert_menu_link_alter in Coder 7
Same name in this branch
- 7 coder_upgrade/conversions/other.inc \coder_upgrade_convert_menu_link_alter()
- 7 coder_upgrade/conversions/function.inc \coder_upgrade_convert_menu_link_alter()
Same name and namespace in other branches
- 7.2 coder_upgrade/conversions/other.inc \coder_upgrade_convert_menu_link_alter()
- 7.2 coder_upgrade/conversions/function.inc \coder_upgrade_convert_menu_link_alter()
Updates hook_menu_link_alter().
Changed hook_menu_link_alter() (removed the $menu parameter).
Parameters
PGPNode $node: A node object containing a PGPClass (or function) item.
2 calls to coder_upgrade_convert_menu_link_alter()
- coder_upgrade_callback_functions in coder_upgrade/
conversions/ other.inc - Callback routine for function changes using grammar parser.
- coder_upgrade_upgrade_hook_menu_link_alter_alter in coder_upgrade/
conversions/ function.inc - Implements hook_upgrade_hook_menu_link_alter_alter().
File
- coder_upgrade/
conversions/ other.inc, line 1176 - Other conversion routine file for the coder_upgrade module.
Code
function coder_upgrade_convert_menu_link_alter(&$node) {
$item =& $node->data;
$count = $item->parameters
->count();
// Adjust parameters.
if ($count > 1) {
// Delete second parameter.
$item
->deleteParameter(1);
}
// TODO Do we need to check for $menu in the body of this hook?
}