You are here

function mp3player_menu in MP3 Player 6

Same name and namespace in other branches
  1. 6.2 mp3player.module \mp3player_menu()
  2. 7.2 mp3player.module \mp3player_menu()

Implementation of hook_menu().

File

./mp3player.module, line 44
mp3player main module file.

Code

function mp3player_menu() {
  $items = array();
  $items['admin/settings/mp3player'] = array(
    'title' => 'MP3 Player',
    'page callback' => 'mp3player_player_list',
    'page arguments' => array(
      'mp3player_player_list',
    ),
    'access arguments' => array(
      'administer mp3player',
    ),
  );
  $items['admin/settings/mp3player/player-list'] = array(
    'title' => 'Player List',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/settings/mp3player/add-new-player'] = array(
    'title' => 'Add new player',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mp3player_player_add',
    ),
    'access arguments' => array(
      'administer mp3player',
    ),
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/settings/mp3player/global-settings'] = array(
    'title' => 'Global Settings',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mp3player_settings',
    ),
    'access arguments' => array(
      'administer mp3player',
    ),
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/settings/mp3player/player/%'] = array(
    'title callback' => 'mp3player_title_callback',
    'title arguments' => array(
      'Edit player: !name',
      4,
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mp3player_player_edit',
      4,
    ),
    'access arguments' => array(
      'administer mp3player',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/settings/mp3player/player/%/delete'] = array(
    'title callback' => 'mp3player_title_callback',
    'title arguments' => array(
      'Delete player: !name',
      4,
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mp3player_player_delete',
      4,
    ),
    'access arguments' => array(
      'administer mp3player',
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}