You are here

function availability_calendars_menu in Availability Calendars 5

Same name and namespace in other branches
  1. 6.2 availability_calendars.module \availability_calendars_menu()
  2. 6 availability_calendars.module \availability_calendars_menu()
  3. 7.2 availability_calendars.module \availability_calendars_menu()

Implementation of hook_menu()

File

./availability_calendars.module, line 14
Availability Calendars Module

Code

function availability_calendars_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/settings/availability-calendars',
      'title' => t('Availability Calendars'),
      'description' => t('Configure global settings for availability calendars module.'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'availability_calendars_admin_settings',
      ),
    );
  }
  else {
    $items[] = array(
      'path' => 'availability-calendars',
      'title' => t('Availability calendar'),
      'callback' => 'availability_calendars_page',
      'access' => user_access('edit availability calendars') || user_access('edit own availability calendars'),
      'type' => MENU_CALLBACK,
    );
  }
  return $items;
}