You are here

function coffee_coffee_command in Coffee 6

Same name and namespace in other branches
  1. 7 coffee.hooks.inc \coffee_coffee_command()

Implements hook_coffee_command().

File

./coffee.hooks.inc, line 101
The hooks that are used by Coffee includes an example of hook_coffee_command()

Code

function coffee_coffee_command($op) {
  switch ($op) {

    // 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;
  }
}