You are here

function patterns_drush_command in Patterns 6.2

Same name and namespace in other branches
  1. 7.2 patterns.drush.inc \patterns_drush_command()
  2. 7 patterns.drush.inc \patterns_drush_command()

Implementation of hook_drush_command().

File

./patterns.drush.inc, line 36
Drush Patterns module commands

Code

function patterns_drush_command() {
  $items['patterns-enable'] = array(
    'callback' => 'drush_patterns_enable',
    'description' => 'Enable the specified pattern name',
    'examples' => array(
      'drush patterns-enable pattern_name [first-update|always|update|first|never]' => 'Enable the pattern specified by pattern id or pattern name',
    ),
    'arguments' => array(
      'id' => 'A pattern id or name',
    ),
    'drupal dependencies' => array(
      'patterns',
      'token',
    ),
    'core' => array(
      '6',
    ),
  );
  $items['patterns-import'] = array(
    'callback' => 'drush_patterns_import',
    'description' => 'Import the specified pattern file.',
    'examples' => array(
      'drush patterns-import path/to/patterns/file.[xml/yaml]' => 'Import the specified pattern file.',
      'drush patterns import path/to/pattern/file.[xml/yaml] pattern_name' => 'Import the specified pattern file and give it a machine readable name',
    ),
    'arguments' => array(
      'pattern_file' => 'The path to a pattern file, beginning from the Drupal base directory',
      'pattern_name' => 'Enter a pattern name if you wish to override the title field entered in a pattern.',
    ),
    'drupal dependencies' => array(
      'patterns',
      'token',
    ),
    'core' => array(
      '6',
    ),
  );
  $items['patterns-run'] = array(
    'callback' => 'drush_patterns_run',
    'description' => 'Import and enable the specified pattern file',
    'examples' => array(
      'drush patterns-run path/to/patterns/file.xml' => 'Import and enable the specified pattern file',
      'drush patterns-run path/to/pattern/file.xml pattern_name' => 'Import and enable the specified pattern file and give it a machine readable name',
    ),
    'arguments' => array(
      'pattern_file' => 'The path to a pattern file',
      'pattern_name' => 'An optional machine-readable pattern name to override the one automatically generated from the title field of the pattern',
    ),
    'drupal dependencies' => array(
      'patterns',
      'token',
    ),
    'core' => array(
      '6',
    ),
  );
  $items['patterns-list'] = array(
    'callback' => 'drush_patterns_list',
    'description' => "List all available patterns.",
  );
  $items['patterns-info'] = array(
    'callback' => 'drush_patterns_info',
    'description' => "Show all info on a given pattern.",
    'arguments' => array(
      'id' => "The pattern id or name of the pattern for which to show info.",
    ),
  );

  //NOT CLEANED YET
  $items['patterns-form-helper'] = array(
    'description' => 'Enable/disable patterns form helper',
    'arguments' => array(
      'action' => "Valid values: enable, disable.",
    ),
  );
  $items['patterns-allow-publish'] = array(
    'description' => 'Enable/disable patterns publishing',
    'arguments' => array(
      'action' => "Valid values: enable, disable.",
    ),
  );
  $items['patterns-paths'] = array(
    'description' => "List all paths patterns will be looked for",
  );
  $items['patterns-publish'] = array(
    'description' => "Publish a pattern.",
    'arguments' => array(
      'pid' => "The ID of the pattern to publish.",
    ),
  );
  $items['patterns-unpublish'] = array(
    'description' => "Unpublish a pattern.",
    'arguments' => array(
      'pid' => "The ID of the pattern to unpublish.",
    ),
  );
  return $items;
}