public function TMGMTJobUIController::hook_menu in Translation Management Tool 7
Provides definitions for implementing hook_menu().
Overrides EntityDefaultUIController::hook_menu
File
- ui/
includes/ tmgmt_ui.controller.job.inc, line 23 - Contains the job UI controller.
Class
- TMGMTJobUIController
- Entity UI controller for the Job Entity.
Code
public function hook_menu() {
$id_count = count(explode('/', $this->path));
$wildcard = isset($this->entityInfo['admin ui']['menu wildcard']) ? $this->entityInfo['admin ui']['menu wildcard'] : '%entity_object';
$items[$this->path . '/' . $wildcard] = array(
'title callback' => 'entity_label',
'title arguments' => array(
$this->entityType,
$id_count,
),
'page callback' => 'tmgmt_ui_job_view',
'page arguments' => array(
$id_count,
),
'load arguments' => array(
$this->entityType,
),
'access callback' => 'entity_access',
'access arguments' => array(
'view',
$this->entityType,
$id_count,
),
'file' => $this->entityInfo['admin ui']['file'],
'file path' => $this->entityInfo['admin ui']['file path'],
);
$items[$this->path . '/' . $wildcard . '/delete'] = array(
'page callback' => 'drupal_get_form',
'page arguments' => array(
$this->entityType . '_operation_form',
$this->entityType,
$id_count,
$id_count + 1,
),
'load arguments' => array(
$this->entityType,
),
'access callback' => 'entity_access',
'access arguments' => array(
'delete',
$this->entityType,
$id_count,
),
'type' => MENU_CALLBACK,
);
$items[$this->path . '/' . $wildcard . '/abort'] = array(
'page callback' => 'drupal_get_form',
'page arguments' => array(
$this->entityType . '_operation_form',
$this->entityType,
$id_count,
$id_count + 1,
),
'load arguments' => array(
$this->entityType,
),
'access callback' => 'entity_access',
'access arguments' => array(
'abort',
$this->entityType,
$id_count,
),
'type' => MENU_CALLBACK,
);
$items[$this->path . '/' . $wildcard . '/resubmit'] = array(
'page callback' => 'drupal_get_form',
'page arguments' => array(
$this->entityType . '_operation_form',
$this->entityType,
$id_count,
$id_count + 1,
),
'load arguments' => array(
$this->entityType,
),
'access callback' => 'entity_access',
'access arguments' => array(
'resubmit',
$this->entityType,
$id_count,
),
'type' => MENU_CALLBACK,
);
return $items;
}