You are here

function node_accessibility_drush_command in Node Accessibility 7

Implements hook_drush_command().

1 call to node_accessibility_drush_command()
node_accessibility_drush_help in ./node_accessibility.drush.inc
Implements hook_drush_help().

File

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

Code

function node_accessibility_drush_command() {
  $items = array();
  $items['acc_validate_node'] = array(
    'callback' => 'node_accessibility_drush_callback_validate',
    'description' => dt("Perform accessibility validation on nodes."),
    'arguments' => array(
      'nids' => dt("Optional list of space-separated node IDs to validate."),
    ),
    'options' => array(
      '--all' => dt("Perform validation on every single node in the system (this may take a while)."),
      '--type' => dt("Perform validation on every single node in the system of the specified content type (use the machine name)."),
      '--delete' => dt("Instead of performing validation, delete the validation information for a given node."),
      '--revisions' => dt("Include all revisions for each node (can make --all take a very long time)."),
      '--chunk' => dt("Set total number of nodes to validate in one pass; defaults to 256."),
    ),
    'examples' => array(
      'drush acc_validate_node 45 46 47' => dt("Validate nodes with IDs of 45, 46, and 47."),
      'drush acc_validate_node --all' => dt("Validate all nodes in the system."),
      'drush acc_validate_node --type page' => dt("Validate all nodes in the system of the content type 'page'."),
      'drush acc_validate_node --all --revisions --delete' => dt("Delete validation problems for all revisions for all nodes in the system."),
    ),
  );

  // Add aliases for usability.
  node_accessibility_drush_command_add_alias($items, 'acc_validate_node', 'acc_validate_node');
  return $items;
}