function hook_drush_engine_type_info

8.0.x drush.api.php hook_drush_engine_type_info()
6.x drush.api.php hook_drush_engine_type_info()
7.x drush.api.php hook_drush_engine_type_info()
5.x drush.api.php hook_drush_engine_type_info()
master drush.api.php hook_drush_engine_type_info()

Inform drush about one or more engine types.

This hook allow to declare available engine types, the cli option to select between engine implementatins, which one to use by default, global options and other parameters. Commands may override this info when declaring the engines they use.

Return value

array An array whose keys are engine type names and whose values describe the characteristics of the engine type in relation to command definitions:

  • description: The engine type description.
  • topic: If specified, the name of the topic command that will display the automatically generated topic for this engine.
  • topic-file: If specified, the path to the file that will be displayed at the head of the automatically generated topic for this engine. This path is relative to the Drush root directory; non-core commandfiles should therefore use: 'topic-file' => dirname(__FILE__) . '/mytopic.html';
  • topics: If set, contains a list of topics that should be added to the "Topics" section of any command that uses this engine. Note that if 'topic' is set, it will automatically be added to the topics list, and therefore does not need to also be listed here.
  • option: The command line option to choose an implementation for this engine type. FALSE means there's no option. That is, the engine type is for internal usage of the command and thus an implementation is not selectable.
  • default: The default implementation to use by the engine type.
  • options: Engine options common to all implementations.
  • add-options-to-command: If there's a single implementation for this engine type, add its options as command level options.
  • combine-help: If there are multiple implementations for this engine type, then instead of adding multiple help items in the form of --engine-option=engine-type [description], instead combine all help options into a single --engine-option that lists the different possible values that can be used.

See also



3 functions implement hook_drush_engine_type_info()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

core_drush_engine_type_info in commands/core/
Implementation of hook_drush_engine_type_info().
outputformat_drush_engine_type_info in commands/core/
Implementation of hook_drush_engine_type_info().
pm_drush_engine_type_info in commands/pm/
Implementation of hook_drush_engine_type_info().


./drush.api.php, line 358
Documentation of the Drush API.


function hook_drush_engine_type_info() {
  return array(
    'dessert' => array(
      'description' => 'Choose a dessert while the sandwich is baked.',
      'option' => 'dessert',
      'default' => 'ice-cream',
      'options' => 'sweetness',
      'add-options-to-command' => FALSE,