function ds_drush_command in Display Suite 8.3
Same name and namespace in other branches
- 8.2 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 13 - Display Suite drush integration.
Code
function ds_drush_command() {
$items = [];
$items['ds-build'] = [
'description' => 'Create a basic template and configuration file for a new Display Suite layout.',
'arguments' => [
'name' => 'Name for your layout.',
],
'options' => [
'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' => [
'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'] = [
'description' => 'Create a Display Suite plugin',
'arguments' => [
'name' => 'Name for your Display Suite field class',
],
'options' => [
'name' => 'Name for your class.',
'entity' => 'Name of the entity',
],
'examples' => [
'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;
}