You are here

function geocoder_drush_command in Geocoder 7

Implements hook_drush_command().

File

./geocoder.drush.inc, line 11
geocoder.drush.inc

Code

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

  // The key in the $items array is the name of the command.
  $items['geocoder-backfill'] = array(
    'callback' => 'geocoder_drush_backfill',
    'description' => 'Geocodes all nodes that have a geocoder widget but no geodata.',
    'options' => array(
      'force' => 'Force the geocode to run, even if there is already geodata',
      'dry' => 'Collect entity ids, but do not update them.',
      'entity_type' => 'An entity type. If none is specified, entities of all types are processed.',
      'field_name' => 'A field name. If none is specified, all applicable fields are processed.',
      'bundle' => 'A bundle name. If none is specified, entities of all bundles are processed.',
      'entity_ids' => 'A list of entity ids, separated by comma (no space). If none are specified, all entities are processed. This requires that entity_type is defined, too.',
    ),
  );
  return $items;
}