You are here

function ad_notify_menu in Advertisement 6

Same name and namespace in other branches
  1. 5.2 notify/ad_notify.module \ad_notify_menu()
  2. 5 notify/ad_notify.module \ad_notify_menu()

Implementation of hook_menu().

File

notify/ad_notify.module, line 30
Receive email notifications regarding ads.

Code

function ad_notify_menu() {
  $items = array();
  $items['node/%node/adowners/%user/notifications'] = array(
    'title callback' => 'owner_notifications_title',
    'title arguments' => array(
      '!owner' => 3,
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'ad_notify_overview_form',
      1,
      3,
    ),
    'access callback' => 'ad_adaccess',
    'access arguments' => array(
      1,
      'manage owners',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 4,
  );
  $items['node/%node/notifications'] = array(
    'title' => 'My notifications',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'ad_notify_overview_form',
      1,
    ),
    'access callback' => 'ad_adaccess',
    'access arguments' => array(
      1,
      array(
        'manage owners',
        'manage own notifications',
      ),
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 4,
  );
  $items['node/%node/adowners/%user/notifications/%ad_notification/delete'] = array(
    'title' => 'Delete notification',
    'page callback' => 'ad_notify_confirm_delete_page',
    'page arguments' => array(
      1,
      3,
      5,
    ),
    'access callback' => 'ad_adaccess',
    'access arguments' => array(
      1,
      array(
        'manage owners',
        'manage own notifications',
      ),
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}