You are here

function download_count_menu in Download Count 5

Same name and namespace in other branches
  1. 6.2 download_count.module \download_count_menu()
  2. 6 download_count.module \download_count_menu()
  3. 7.3 download_count.module \download_count_menu()
  4. 7.2 download_count.module \download_count_menu()

Implementation of hook_menu()

File

./download_count.module, line 29
Download counter

Code

function download_count_menu($may_cache) {
  $items = array();
  $access = user_access('view all downloads count') || user_access('view own nodes downloads count');
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/settings/download_count',
      'description' => t('Increments a download counter and logs a descriptive message each time an attached file is downloaded.'),
      'title' => t('Download count'),
      'callback' => 'drupal_get_form',
      'callback arguments' => 'download_count_admin_settings',
      'type' => MENU_NORMAL_ITEM,
    );
    $items[] = array(
      'path' => 'download_counter',
      'title' => t('Download counter'),
      'callback' => 'download_count_view_page',
      'access' => $access,
      'type' => MENU_NORMAL_ITEM,
    );
  }
  return $items;
}