function onlyone_drush_command in Allow a content type only once (Only One) 7
Same name and namespace in other branches
- 8 onlyone.drush.inc \onlyone_drush_command()
Implements hook_drush_command().
File
- ./
onlyone.drush.inc, line 14 - Drush commands related to the Only One module.
Code
function onlyone_drush_command() {
$items['onlyone-list'] = array(
'description' => dt("Shows a content types list according to the selected status."),
'aliases' => array(
'ol',
),
'arguments' => array(
'status' => dt('Content type status (configured, available, notavailable or summary)'),
),
'examples' => array(
'drush onlyone-list configured' => dt("Lists the content types already configured in 'Only One content' mode."),
'drush onlyone-list available' => dt("Lists the content types which can be configured in 'Only One content' mode."),
'drush onlyone-list notavailable' => dt("Lists the content types which cannot be configured in 'Only One content' mode."),
'drush onlyone-list summary' => dt("Lists the summary for all the content types."),
),
);
$items['onlyone-enable'] = array(
'description' => dt("Enables the 'Only One content' mode on content types."),
'arguments' => array(
'content_type' => dt('List of content types machine names.'),
),
'aliases' => array(
'oen',
),
'examples' => array(
'drush onlyone-enable article' => dt("Enables the 'Only One content' mode for 'Article' content type."),
'drush onlyone-enable article page' => dt("Enables the 'Only One content' mode for 'Article' and 'Basic page' content types."),
),
);
$items['onlyone-disable'] = array(
'description' => dt("Disables the 'Only One content' mode on content types."),
'arguments' => array(
'content_type' => dt('List of content types machine names.'),
),
'aliases' => array(
'odis',
),
'examples' => array(
'drush onlyone-enable article' => dt("Disables the 'Only One content' mode for 'Article' content type."),
'drush onlyone-enable article page' => dt("Disables the 'Only One content' mode for 'Article' and 'Basic page' content types."),
),
);
$items['onlyone-new-menu-entry'] = array(
'description' => dt('Configures if the configured content types will be shown in a new menu entry.'),
'arguments' => array(
'status' => dt('The status option (on, off).'),
),
'examples' => array(
'onlyone-new-menu-entry' => dt('Shows if configured content types will be shown in a new menu entry or not.'),
'onlyone-new-menu-entry on' => dt('Create a new menu entry for the configured content types.'),
'onlyone-new-menu-entry off' => dt('Delete the menu entry for the configured content types.'),
),
'aliases' => array(
'onme',
),
);
return $items;
}