function coffee_coffee_command in Coffee 7
Same name and namespace in other branches
- 6 coffee.hooks.inc \coffee_coffee_command()
Implements hook_coffee_command().
File
- ./
coffee.hooks.inc, line 100 - The hooks that are used by Coffee includes an example of hook_coffee_command()
Code
function coffee_coffee_command($op) {
switch ($op) {
// Example usage of how a result array should be formatted.
case 'help':
$return['help'] = array(
'path' => 'admin/help/coffee',
'title' => 'Coffee Help',
);
break;
// Display the links of the node/add page.
case 'add':
// This method is used in the core nodes module.
$path = 'node/add';
$item = menu_get_item($path);
$content_types = system_admin_menu_block($item);
$return = array();
foreach ($content_types as $content_type) {
$return[] = array(
'path' => $content_type['link_path'],
'title' => $content_type['link_title'],
);
}
break;
}
if (isset($return)) {
return $return;
}
}