function ds_drush_command in Display Suite 8.2
Same name and namespace in other branches
- 8.3 drush/ds.drush.inc \ds_drush_command()
- 7.2 drush/ds.drush.inc \ds_drush_command()
- 7 ds.drush.inc \ds_drush_command()
Implements hook_drush_command().
File
- drush/
ds.drush.inc, line 14 - Display Suite drush integration.
Code
function ds_drush_command() {
$items = array();
$items['ds-build'] = array(
'description' => 'Create a basic template and configuration file for a new Display Suite layout.',
'arguments' => array(
'name' => 'Name for your layout.',
),
'options' => array(
'name' => 'Name for your layout.',
'regions' => 'Regions for your layout, comma-separated.',
'css' => 'Set this to true if you want to include a CSS file for your layout.',
'image' => 'Set this to true if you want to include a preview image for your layout.',
),
'examples' => array(
'drush ds-build "My layout name"' => 'Create a layout with a few example regions.',
'drush ds-build "My layout name" --regions="Region 1, Region 2"' => 'Create a layout with custom regions.',
'drush ds-build "My layout name" --css' => 'Create a layout with an included CSS file.',
),
);
$items['ds-field'] = array(
'description' => 'Create a Display Suite plugin',
'arguments' => array(
'name' => 'Name for your Display Suite field class',
),
'options' => array(
'name' => 'Name for your class.',
'entity' => 'Name of the entity',
),
'examples' => array(
'drush ds-field "MyField"' => 'Create a field with only a render function',
'drush ds-field "MyTest" --entity=user' => 'Create a field for the user entity',
),
);
return $items;
}