You are here

function coder_upgrade_upgrade_call_menu_valid_path_alter in Coder 7

Same name and namespace in other branches
  1. 7.2 coder_upgrade/conversions/call.inc \coder_upgrade_upgrade_call_menu_valid_path_alter()

Implements hook_upgrade_call_menu_valid_path_alter().

File

coder_upgrade/conversions/call.inc, line 1899
Provides conversion routines applied to function calls.

Code

function coder_upgrade_upgrade_call_menu_valid_path_alter(&$node, &$reader) {

  // DONE
  // Create helper objects.
  $editor = PGPEditor::getInstance();

  // Get the function call object.
  $item =& $node->data;

  // Process function call.
  $name =& $item->name;

  // NOT DONE
  $name['value'] = 'drupal_valid_path';

  //      cdp($item->parameters->print_r());
  $count = $item->parameters
    ->count();
  if (!$count) {
    $editor
      ->setParameter($item, 0, "'' /* TODO Please pass a menu path */");
    return;
  }
  coder_upgrade_convert_menu_valid_path($item, $reader, $editor);
}