You are here

function farm_asset_farm_asset_view_access_check in farmOS 7

Callback to determine if a page is accessible.

Parameters

string $task: The task plugin.

int $subtask_id: The subtask id.

array $contexts: The contexts loaded for the task.

Return value

bool TRUE if the current user can access the page.

1 string reference to 'farm_asset_farm_asset_view_access_check'
farm_asset_farm_asset_view_page_manager_tasks in modules/farm/farm_asset/includes/ctools/farm_asset_view.inc
Specialized implementation of hook_farm_asset_task_tasks().

File

modules/farm/farm_asset/includes/ctools/farm_asset_view.inc, line 205
Handle the 'farm_asset view' override task.

Code

function farm_asset_farm_asset_view_access_check($task, $subtask_id, array $contexts) {
  $context = reset($contexts);
  return farm_asset_access('view', $context->data);
}