You are here

function features_drush_command in Features 6

Same name and namespace in other branches
  1. 8.4 drush/features.drush8.inc \features_drush_command()
  2. 8.3 drush/features.drush8.inc \features_drush_command()
  3. 7.2 features.drush.inc \features_drush_command()
  4. 7 features.drush.inc \features_drush_command()

Implementation of hook_drush_command().

@See drush_parse_command() for a list of recognized keys.

Return value

An associative array describing your command(s).

File

./features.drush.inc, line 16
Features module drush integration.

Code

function features_drush_command() {
  $items = array();
  $items['features-list'] = array(
    'description' => "List all the available features for your site.",
    'drupal dependencies' => array(
      'features',
    ),
    'aliases' => array(
      'fl',
      'features',
    ),
  );
  $items['features-export'] = array(
    'description' => "Export a feature from your site into a module.",
    'arguments' => array(
      'feature' => 'Feature name to export.',
    ),
    'drupal dependencies' => array(
      'features',
    ),
    'aliases' => array(
      'fe',
    ),
  );
  $items['features-add'] = array(
    'description' => "Add a component to a feature module.",
    'drupal dependencies' => array(
      'features',
    ),
    'arguments' => array(
      'feature' => 'Feature name to add to.',
      'components' => 'List of components to add.',
    ),
    'aliases' => array(
      'fa',
    ),
  );
  $items['features-update'] = array(
    'description' => "Update a feature module on your site.",
    'arguments' => array(
      'feature' => 'A space delimited list of features.',
    ),
    'drupal dependencies' => array(
      'features',
    ),
    'aliases' => array(
      'fu',
    ),
  );
  $items['features-update-all'] = array(
    'description' => "Update all feature modules on your site.",
    'arguments' => array(
      'feature_exclude' => 'A space-delimited list of features to exclude from being updated.',
    ),
    'drupal dependencies' => array(
      'features',
    ),
    'aliases' => array(
      'fu-all',
      'fua',
    ),
  );
  $items['features-revert'] = array(
    'description' => "Revert a feature module on your site.",
    'arguments' => array(
      'feature' => 'A space delimited list of features.',
    ),
    'options' => array(
      'force' => "Force revert even if Features assumes components' state are default.",
    ),
    'drupal dependencies' => array(
      'features',
    ),
    'aliases' => array(
      'fr',
    ),
  );
  $items['features-revert-all'] = array(
    'description' => "Revert all enabled feature module on your site.",
    'arguments' => array(
      'feature_exclude' => 'A space-delimited list of features to exclude from being reverted.',
    ),
    'options' => array(
      'force' => "Force revert even if Features assumes components' state are default.",
    ),
    'drupal dependencies' => array(
      'features',
    ),
    'aliases' => array(
      'fr-all',
      'fra',
    ),
  );
  $items['features-diff'] = array(
    'description' => "Show the difference between the default and overridden state of a feature.",
    'arguments' => array(
      'feature' => 'The feature in question.',
    ),
    'drupal dependencies' => array(
      'features',
      'diff',
    ),
    'aliases' => array(
      'fd',
    ),
  );
  return $items;
}