You are here

function flag_actions_menu in Flag 5

Same name and namespace in other branches
  1. 6.2 flag_actions.module \flag_actions_menu()
  2. 6 flag_actions.module \flag_actions_menu()
  3. 7.3 flag_actions.module \flag_actions_menu()
  4. 7.2 flag_actions.module \flag_actions_menu()

Implementation of hook_menu().

File

./flag_actions.module, line 18
Actions support for the Flag module.

Code

function flag_actions_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/build/flags/actions',
      'title' => t('Actions'),
      'callback' => 'flag_actions_page',
      'access' => user_access('administer actions'),
      'type' => MENU_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/build/flags/actions/add',
      'title' => t('Add action'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'flag_actions_form',
        NULL,
      ),
      'access' => user_access('administer actions'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/build/flags/actions/delete',
      'title' => t('Delete action'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'flag_actions_delete_form',
      ),
      'access' => user_access('administer actions'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/build/flags/actions/configure',
      'title' => t('Edit action'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'flag_actions_form',
      ),
      'access callback' => user_access('administer actions'),
      'type' => MENU_CALLBACK,
    );
  }
  return $items;
}