You are here

function simplenews_statistics_menu in Simplenews Statistics 6

Same name and namespace in other branches
  1. 6.3 simplenews_statistics.module \simplenews_statistics_menu()
  2. 6.2 simplenews_statistics.module \simplenews_statistics_menu()
  3. 7.2 simplenews_statistics.module \simplenews_statistics_menu()
  4. 7 simplenews_statistics.module \simplenews_statistics_menu()

Implementation of hook_menu().

File

./simplenews_statistics.module, line 12
Gathers newsletter statistics.

Code

function simplenews_statistics_menu() {
  $items['admin/content/simplenews/statistics'] = array(
    'title' => 'Statistics',
    'description' => 'View the openings/rate and clicks/CTR for your newsletters',
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'simplenews_statistics_admin_form',
    ),
    'access arguments' => array(
      'administer newsletters',
    ),
  );
  $items['admin/content/simplenews/statistics/%'] = array(
    'title' => 'Statistics Details',
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'simplenews_statistics_admin_opens',
      4,
    ),
    'access arguments' => array(
      'administer newsletters',
    ),
  );
  $items['admin/content/simplenews/statistics/%/opens'] = array(
    'title' => 'Newsletter opens',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/content/simplenews/statistics/%/clicks'] = array(
    'title' => 'Newsletter clicks',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'simplenews_statistics_admin_clicks',
      4,
    ),
    'access arguments' => array(
      'administer newsletters',
    ),
  );
  $items['simplenews/statistics/view'] = array(
    'type' => MENU_CALLBACK,
    'page callback' => 'simplenews_statistics_view',
    'access arguments' => array(
      'access content',
    ),
  );
  $items['simplenews/statistics/click'] = array(
    'type' => MENU_CALLBACK,
    'page callback' => 'simplenews_statistics_click',
    'access arguments' => array(
      'access content',
    ),
  );
  return $items;
}