public function TMGMTLocalTaskItemUIController::hook_menu in Translation Management Tool 7
Provides definitions for implementing hook_menu().
Overrides EntityDefaultUIController::hook_menu
File
- translators/
tmgmt_local/ controller/ tmgmt_local.ui_controller.task_item.inc, line 11
Class
- TMGMTLocalTaskItemUIController
- Entity UI controller for the local task item entity.
Code
public function hook_menu() {
$id_count = count(explode('/', $this->path));
$items[$this->path . '/%tmgmt_local_task/item/%tmgmt_local_task_item'] = array(
'title callback' => 'entity_label',
'title arguments' => array(
$this->entityType,
$id_count + 2,
),
'page callback' => 'tmgmt_local_task_item_view',
'page arguments' => array(
$id_count + 2,
),
'load arguments' => array(
$this->entityType,
),
'access callback' => 'entity_access',
'access arguments' => array(
'view',
$this->entityType,
$id_count + 2,
),
'file' => 'tmgmt_local.pages.inc',
'file path' => drupal_get_path('module', 'tmgmt_local') . '/includes',
);
return $items;
}