Commit 63464b33 authored by TravisCarden's avatar TravisCarden

By TravisCarden: Touched up and documented Drush commands.

parent 74172e28
......@@ -5,6 +5,7 @@ CONTENTS OF THIS FILE
* Introduction
* Installation
* Implementation
* Drush
INTRODUCTION
......@@ -35,3 +36,12 @@ checklist. (Note: it is the responsibility of implementing modules to remove
their own variables on hook_uninstall().)
See checklistapi.api.php for more details.
DRUSH
-----
Checklist API provides Drush commands. They require Drush 6 or later. To see the
list of available commands, run `drush --filter=checklistapi`. For more about
Drush, including installation instructions, visit
https://github.com/drush-ops/drush.
......@@ -30,6 +30,16 @@ function checklistapi_drush_command() {
return $items;
}
/**
* Implements hook_drush_help().
*/
function checklistapi_drush_help($section) {
switch ($section) {
case 'meta:checklistapi:title':
return dt('Checklist API commands');
}
}
/**
* Drush callback for checklist listing.
*/
......@@ -85,15 +95,15 @@ function drush_checklistapi_info_validate() {
'!id' => $id,
)));
}
drush_set_context('checklist', $checklist);
}
/**
* Drush callback for checklist info.
*/
function drush_checklistapi_info() {
$arguments = drush_get_arguments();
$id = $arguments[1];
$checklist = checklistapi_checklist_load($id);
$checklist = drush_get_context('checklist');
// Print the help.
if (!empty($checklist->help)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment