You are here

function CertificateEntityUIController::hook_menu in Certificate 7.3

Same name and namespace in other branches
  1. 8.3 certificate.classes.inc \CertificateEntityUIController::hook_menu()

Provides definitions for implementing hook_menu().

Overrides EntityBundleableUIController::hook_menu

File

./certificate.classes.inc, line 43

Class

CertificateEntityUIController
Custom Entity admin

Code

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

  // Set this on the object so classes that extend hook_menu() can use it.
  $this->id_count = count(explode('/', $this->path));
  $plural_label = isset($this->entityInfo['plural label']) ? $this->entityInfo['plural label'] : $this->entityInfo['label'] . 's';
  $items[$this->path] = array(
    'title' => $plural_label,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      $this->entityType . '_overview_form',
      $this->entityType,
    ),
    'description' => 'Manage ' . $plural_label . '.',
    'access callback' => 'entity_access',
    'access arguments' => array(
      'view',
      $this->entityType,
    ),
    'file' => 'includes/entity.ui.inc',
  );
  $items[$this->path . '/list'] = array(
    'title' => 'List',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  return $items;
}