You are here

public function PartyUIController::hook_menu in Party 7

Same name and namespace in other branches
  1. 8.2 includes/party.ui.inc \PartyUIController::hook_menu()

Provides definitions for implementing hook_menu().

Overrides EntityDefaultUIController::hook_menu

File

includes/party.ui.inc, line 15
Provides a controller for building a party overview form.

Class

PartyUIController
Controller for providing Party UI.

Code

public function hook_menu() {
  $items = parent::hook_menu();

  // Set the main path title and description as it's our general admin hub.
  $items[$this->path]['title'] = t('Community');
  $items[$this->path]['description'] = t('Manage the community');
  $items[$this->path]['access callback'] = 'user_access';
  $items[$this->path]['access arguments'] = array(
    'administer crm settings',
  );

  // Remove the entity add callback for now, as we provide our own.
  // @todo: use htis one instead!
  unset($items[$this->path . '/add']);

  // Disambiguate the 'list' tab.
  $items[$this->path . '/list']['title'] = 'List parties';
  $items[$this->path . '/list']['access arguments'] = array(
    'administer crm settings',
  );
  return $items;
}