tmgmt_local.ui_controller.task_item.inc 879 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * Entity UI controller for the local task item entity.
  4. */
  5. class TMGMTLocalTaskItemUIController extends EntityDefaultUIController {
  6. /**
  7. * {@inheritdoc}
  8. */
  9. public function hook_menu() {
  10. $id_count = count(explode('/', $this->path));
  11. $items[$this->path . '/%tmgmt_local_task/item/%tmgmt_local_task_item'] = array(
  12. 'title callback' => 'entity_label',
  13. 'title arguments' => array($this->entityType, $id_count + 2),
  14. 'page callback' => 'tmgmt_local_task_item_view',
  15. 'page arguments' => array($id_count + 2),
  16. 'load arguments' => array($this->entityType),
  17. 'access callback' => 'entity_access',
  18. 'access arguments' => array('view', $this->entityType, $id_count + 2),
  19. 'file' => 'tmgmt_local.pages.inc',
  20. 'file path' => drupal_get_path('module', 'tmgmt_local') . '/includes',
  21. );
  22. return $items;
  23. }
  24. }