You are here

function getlocations_drush_command in Get Locations 7

Same name and namespace in other branches
  1. 7.2 drush/getlocations.drush.inc \getlocations_drush_command()

Implements hook_drush_command().

In this hook, you specify which commands your drush module makes available, what it does and description.

Notice how this structure closely resembles how you define menu hooks.

See `drush topic docs-commands` for a list of recognized keys.

Return value

An associative array describing your command(s).

File

drush/getlocations.drush.inc, line 36
getlocations.drush.inc @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function getlocations_drush_command() {
  $items = array();

  // the key in the $items array is the name of the command.
  $items['getlocations-markers'] = array(
    'callback' => 'drush_getlocations_markers',
    'description' => dt('Download and install the basic set of getlocations markers.'),
    'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
    // No bootstrap.
    'arguments' => array(
      'path' => dt('Optional. A path where to install the Getlocations markers. If omitted Drush will use the default location.'),
    ),
    'aliases' => array(
      'getlocationsmarkers',
    ),
  );
  $items['getlocations-geojson'] = array(
    'callback' => 'drush_getlocations_geojson',
    'description' => dt('Download and install the GeoJSON javascript library.'),
    'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
    // No bootstrap.
    'arguments' => array(
      'path' => dt('Optional. A path where to install the GeoJSON javascript library. If omitted Drush will use the default location.'),
    ),
    'aliases' => array(
      'getlocationsgeojson',
    ),
  );
  $items['getlocations-geocoder'] = array(
    'callback' => 'drush_getlocations_geocoder',
    'description' => dt('Download and install the geocoder-js javascript library.'),
    'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
    // No bootstrap.
    'arguments' => array(
      'path' => dt('Optional. A path where to install the geocoder-js javascript library. If omitted Drush will use the default location.'),
    ),
    'aliases' => array(
      'getlocationsgeocoder',
    ),
  );
  $items['getlocations-leaflet'] = array(
    'callback' => 'drush_getlocations_leaflet',
    'description' => dt('Download and install the Leafletjs library.'),
    'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
    // No bootstrap.
    'arguments' => array(
      'path' => dt('Optional. A path where to install the Leafletjs library. If omitted Drush will use the default location.'),
    ),
    'aliases' => array(
      'getlocationsleaflet',
    ),
  );
  $items['getlocations-leaflet-hash'] = array(
    'callback' => 'drush_getlocations_leaflet_hash',
    'description' => dt('Download and install the Leaflet-hash library.'),
    'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
    // No bootstrap.
    'arguments' => array(
      'path' => dt('Optional. A path where to install the Leaflet-hash library. If omitted Drush will use the default location.'),
    ),
    'aliases' => array(
      'getlocationsleaflethash',
    ),
  );
  return $items;
}