You are here

function features_drush_command in Features 7

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. 6 features.drush.inc \features_drush_command()
  4. 7.2 features.drush.inc \features_drush_command()

Implements hook_drush_command().

Return value

An associative array describing your command(s).

See also

drush_parse_command()

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.',
      'components' => 'Patterns of components to include, see features-components for the format of patterns.',
    ),
    'options' => array(
      'destination' => "Destination path (from Drupal root) of the exported feature. Defaults to 'sites/all/modules'",
      'version-set' => "Specify a version number for the feature.",
      'version-increment' => "Increment the feature's version number.",
    ),
    'drupal dependencies' => array(
      'features',
    ),
    'aliases' => array(
      'fe',
    ),
  );
  $items['features-add'] = array(
    'description' => "Add a component to a feature module. (DEPRECATED: use features-export)",
    'arguments' => array(
      'feature' => 'Feature name to add to.',
      'components' => 'List of components to add.',
    ),
    'options' => array(
      'version-set' => "Specify a version number for the feature.",
      'version-increment' => "Increment the feature's version number.",
    ),
    'drupal dependencies' => array(
      'features',
    ),
    'aliases' => array(
      'fa',
    ),
  );
  $items['features-components'] = array(
    'description' => 'List features components.',
    'arguments' => array(
      'patterns' => 'The features components type to list. Omit this argument to list all components.',
    ),
    'options' => array(
      'exported' => array(
        'description' => 'Show only components that have been exported.',
      ),
      'not-exported' => array(
        'description' => 'Show only components that have not been exported.',
      ),
    ),
    'aliases' => array(
      'fc',
    ),
  );
  $items['features-update'] = array(
    'description' => "Update a feature module on your site.",
    'arguments' => array(
      'feature' => 'A space delimited list of features.',
    ),
    'options' => array(
      'version-set' => "Specify a version number for the feature.",
      'version-increment' => "Increment the feature's version number.",
    ),
    '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 or feature.component pairs.',
    ),
    'options' => array(
      'force' => "Force revert even if Features assumes components' state are default.",
    ),
    'examples' => array(
      'drush fr foo.node foo.taxonomy bar' => 'Revert node and taxonomy components of feature "foo", but only if they are overriden. Revert all overriden components of feature "bar".',
      'drush fr foo.node foo.taxonomy bar --force' => 'Revert node and taxonomy components of feature "foo". Revert all components of feature "bar".',
    ),
    '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;
}