You are here

function node_accessibility_drush_command_add_alias in Node Accessibility 7

A function to help alias commands as other commands.

1 call to node_accessibility_drush_command_add_alias()
node_accessibility_drush_command in ./node_accessibility.drush.inc
Implements hook_drush_command().

File

./node_accessibility.drush.inc, line 44
Defines the accessibilty page drush functions.

Code

function node_accessibility_drush_command_add_alias(&$items, $command, $alias) {

  // Create a property on the command for adding aliases, if not there.
  if (!isset($items[$command]['node_accessibility command aliases'])) {
    $items[$command]['node_accessibility command aliases'] = array();
  }

  // Record the alias into that property.
  $items[$command]['node_accessibility command aliases'][] = $alias;

  // Create the alias as a new command.
  $items[$alias] = $items[$command];

  // Indicate what this new command is an alias for.
  $items[$alias]['node_accessibility alias for'] = $command;
}