function lingotek_drush_command in Lingotek Translation 7.7
Same name and namespace in other branches
- 8.2 lingotek.drush.inc \lingotek_drush_command()
- 4.0.x lingotek.drush.inc \lingotek_drush_command()
- 3.0.x lingotek.drush.inc \lingotek_drush_command()
- 3.1.x lingotek.drush.inc \lingotek_drush_command()
- 3.2.x lingotek.drush.inc \lingotek_drush_command()
- 3.3.x lingotek.drush.inc \lingotek_drush_command()
- 3.4.x lingotek.drush.inc \lingotek_drush_command()
- 3.5.x lingotek.drush.inc \lingotek_drush_command()
- 3.6.x lingotek.drush.inc \lingotek_drush_command()
- 3.7.x lingotek.drush.inc \lingotek_drush_command()
- 3.8.x lingotek.drush.inc \lingotek_drush_command()
Implements hook_drush_command().
File
- ./
lingotek.drush.inc, line 34 - Drush command file
Code
function lingotek_drush_command() {
$items = array();
$items['lt-push'] = array(
'command-hook' => 'push',
'description' => dt('Push all the instances of an entity up to Lingotek TMS'),
'arguments' => array(
'entity' => 'The entity type to be pushed (config, node, etc.)',
),
'required-arguments' => TRUE,
'options' => array(
'bundles' => 'Comma delimited list of bundles (e.g. article, blog)',
),
'examples' => array(
'drush lt-push config' => 'Upload all checked config to the TMS',
'drush lt-push node --bundles=article,blog' => 'upload nodes of type article and blog to the TMS',
),
);
$items['lt-cleanup'] = array(
'command-hook' => 'cleanup',
'description' => dt('Run the Lingotek field language cleanup utility'),
'arguments' => array(
'entity' => 'The entity type to process (taxonomy_term, node, etc.)',
),
'required-arguments' => TRUE,
'examples' => array(
'drush lt-cleanup node' => 'Cleanup language field settings on nodes',
),
);
$items['lt-prepare-blocks'] = array(
'command-hook' => 'prepare_blocks',
'callback arguments' => array(
array(
'blocks' => 'blocks',
),
'lingotek_translate_config_blocks',
),
'description' => dt('Prepare blocks for Lingotek translation.'),
'examples' => array(
'drush lt-prepare-blocks' => '',
),
);
$items['lt-prepare-taxonomies'] = array(
'command-hook' => 'prepare_vocab',
'callback arguments' => array(
array(
'taxonomy' => 'taxonomy',
),
'lingotek_translate_config_taxonomies',
),
'description' => dt('Prepare vocabularies for Lingotek translation.'),
'examples' => array(
'drush lt-prepare-taxonomies' => '',
),
);
$items['lt-prepare-menus'] = array(
'command-hook' => 'prepare_menus',
'callback arguments' => array(
array(
'menu' => 'menu',
),
'lingotek_translate_config_menus',
),
'description' => dt('Prepare menus for Lingotek translation.'),
'examples' => array(
'drush lt-prepare-menus' => '',
),
);
$items['lt-db-cleanup'] = array(
'command-hook' => 'db_cleanup',
'description' => dt('Disassociates entities and config items locally.'),
'examples' => array(
'drush lt-db-cleanup' => '',
),
);
// Commented out: error reported /home/{user}/.composer/vendor/drush/drush/commands/core/drupal/batch.inc on line 45 and 137
// $items['lt-prepare-builtins'] = array(
// 'command-hook' => 'prepare_builtins',
// 'description' => dt('Prepare built-in strings for Lingotek translation.'),
// 'examples' => array(
// 'drush lt-prepare-builtins' => '',
// ),
// );
return $items;
}