You are here

function search_api_synonym_drush_command in Search API Synonym 8

Implements hook_drush_command().

File

./search_api_synonym.drush.inc, line 11
Drush commands for Search API Synonym.

Code

function search_api_synonym_drush_command() {
  $items = [];
  $items['search-api-synonym-export'] = [
    'description' => 'Export search synonyms to a specific format.',
    'examples' => [
      'drush search-api-synonym-export --plugin=solr langcode=da type=spelling_error filter=all' => dt('Export all Danish spelling errors in the Solr format.'),
      'drush sapi-syn-ex --plugin=solr langcode=da type=spelling_error filter=all' => dt('Export all Danish spelling errors in the Solr format.'),
    ],
    'options' => [
      'plugin' => dt('Machine name of the export plugin. E.g. solr.'),
      'langcode' => dt('Language being exported. Use the language code. E.g. en or da.'),
      'type' => dt('Synonym type. Allowed values: synonym = Synomyms, spelling_error = Spelling errors, all = All types (synonyms and spelling errors). Defaults to "alL".'),
      'filter' => dt('Export filter. Allowed values: nospace = Skip all words containing a space, onlyspace = Skip all words without a space. Defaults to "all".'),
      'incremental' => dt('Incremental export - use Unix timestamp. Only export synonyms changed after the provided timestamp.'),
      'file' => dt('File name used when saving the exported file. Include extension but not folder name!.'),
    ],
    'aliases' => [
      'sapi-syn-ex',
    ],
  ];
  return $items;
}