You are here

function calendar_ical_menu in Calendar 5.2

Same name and namespace in other branches
  1. 5 calendar_ical.module \calendar_ical_menu()

Implementation of hook_menu().

File

./calendar_ical.module, line 11
Adds ical functionality to Calendar.

Code

function calendar_ical_menu($may_cache) {
  $items = array();
  if (!$may_cache) {
    drupal_add_css(drupal_get_path('module', 'calendar') . '/calendar.css');
    require_once './' . drupal_get_path('module', 'calendar') . '/calendar.module';
    foreach (calendar_info() as $view_name => $view) {
      $items[] = array(
        'path' => 'admin/settings/calendar/' . $view_name . '/ical',
        'title' => t('iCal'),
        'description' => t('iCal setup.'),
        'access' => user_access('administer views'),
        'callback' => 'drupal_get_form',
        'callback arguments' => array(
          'calendar_ical_setup_form',
          $view_name,
        ),
        'type' => MENU_LOCAL_TASK,
        'weight' => 6,
      );
    }
  }
  return $items;
}