You are here

function tmgmt_local_task_item_access in Translation Management Tool 7

Access callback for the local task item entity.

Parameters

$op: The operation being performed.

$item: (Optional) A TMGMTLocalTaskItem entity to check access for. If no entity is given, it will be determined whether access is allowed for all entities.

$account: (Optional) The user to check for. Leave it to NULL to check for the global user.

Return value

boolean TRUE if access is allowed, FALSE otherwise.

1 string reference to 'tmgmt_local_task_item_access'
tmgmt_local_entity_info in translators/tmgmt_local/tmgmt_local.module
Implements hook_entity_info().

File

translators/tmgmt_local/tmgmt_local.module, line 435
Main module file for the local translation module.

Code

function tmgmt_local_task_item_access($op, TMGMTLocalTaskItem $item = NULL, $account = NULL) {
  $task = NULL;
  if ($item) {
    $task = $item
      ->getTask();
  }
  return entity_access($op, 'tmgmt_local_task', $task, $account);
}