You are here

function birthdays_menu in Birthdays 5

Same name and namespace in other branches
  1. 6 birthdays.module \birthdays_menu()
  2. 7 birthdays.module \birthdays_menu()

Implementation of hook_menu().

File

./birthdays.module, line 151
The Birthdays module allows users to add their birthday to their profile. It lists birthdays on a seperate page and in different blocks. Users can receive an e-mail on their birthday automatically, and the administrator can receive daily reminders of…

Code

function birthdays_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/settings/birthdays',
      'title' => t('Birthdays'),
      'description' => t('Set user birthday mail and toggle user mail, upcoming birthdays mail and more.'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'birthdays_admin_settings',
      ),
      'access' => user_access('administer site configuration'),
      'type' => MENU_NORMAL_ITEM,
    );
    $items[] = array(
      'path' => 'admin/settings/birthdays/settings',
      'title' => t('Settings'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'birthdays_admin_settings',
      ),
      'access' => user_access('administer site configuration'),
      'type' => MENU_DEFAULT_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/settings/birthdays/sync',
      'title' => t('Synchronize'),
      'description' => t('Synchronize birthdays information of Profile module and Birthdays module. Used either when updating to a newer version of Birthdays or when integrating with an existing Profile Field.'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'birthdays_sync_form',
      ),
      'access' => user_access('administer site configuration'),
      'type' => MENU_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'birthdays',
      'title' => t('Birthdays'),
      'description' => t('List the birthdays of all users.'),
      'callback' => 'birthdays_view_page',
      'access' => user_access('access birthdays'),
      'type' => MENU_SUGGESTED_ITEM,
    );
  }
  return $items;
}