You are here

function sf_import_drush_command in Salesforce Suite 6.2

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

Implementation of hook_drush_command().

File

sf_import/sf_import.drush.inc, line 30
Drush integration for Salesforce Import module. Provides commands to import Salesforce data.

Code

function sf_import_drush_command() {
  $items['sf-fieldmap'] = array(
    'description' => 'List available salesforce fieldmaps or shows information on a given fieldmap',
    'arguments' => array(
      'fieldmap' => 'Optional, key of fieldmap for which to retrieve information',
    ),
    'options' => array(
      '--no-sf' => 'Don\'t check the number of available records on Salesforce',
      '--where' => 'Enter any additional SOQL "Where" conditions for checking number of records on Salesforce',
    ),
  );
  $items['sf-import'] = array(
    'description' => 'Initiate a salesforce import.',
    'arguments' => array(
      'fieldmap' => 'Name of the fieldmap to import',
    ),
    'options' => array(
      '--where' => 'Enter any additional SOQL "Where" conditions',
      '--start' => 'Start importing at given row',
      '--count' => 'Only import the given number of rows',
      '--no-new' => 'Don\'t import new rows (if we have linking information)',
      '--no-update' => 'Don\'t update existing rows (if we having linking information)',
      '--check-date' => 'Only import rows that have a Salesforce last modified date more
      recent than the Drupal changed date (only applies to nodes)',
    ),
  );
  $items['sf-get-updated'] = array(
    'description' => 'Get updated Salesforce records',
    'options' => array(
      '--no-process' => 'Save the updated SFIDs to sf_import_queue table, but do not process',
    ),
  );
  return $items;
}