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

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.
  • 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.

See also

drush_get_engine_types_info()

pm_drush_engine_type_info()

2 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/core.drush.inc
Implementation of hook_drush_engine_type_info().
pm_drush_engine_type_info in commands/pm/pm.drush.inc
Implementation of hook_drush_engine_type_info().

File

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

Code

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,
    ),
  );
}