You are here

public function GDPRTaskUIController::hook_menu in General Data Protection Regulation 7

Provides definitions for implementing hook_menu().

Overrides EntityBundleableUIController::hook_menu

File

modules/gdpr_tasks/src/Entity/GDPRTaskUIController.php, line 11

Class

GDPRTaskUIController
The Task type entity controller class.

Code

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

  // Set this on the object so classes that extend hook_menu() can use it.
  $plural_label = isset($this->entityInfo['plural label']) ? $this->entityInfo['plural label'] : $this->entityInfo['label'] . 's';
  $items['admin/config/gdpr/task-list'] = 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',
    'weight' => 10,
  );
  return $items;
}