function farm_asset_farm_asset_view_page_manager_tasks in farmOS 7
Specialized implementation of hook_farm_asset_task_tasks().
See api-task.html for more information.
File
- modules/
farm/ farm_asset/ includes/ ctools/ farm_asset_view.inc, line 17 - Handle the 'farm_asset view' override task.
Code
function farm_asset_farm_asset_view_page_manager_tasks() {
return array(
// This is a 'page' task and will fall under the page admin UI.
'task type' => 'page',
'title' => t('farm_asset template'),
'admin title' => t('farm_asset template'),
'admin description' => t('When enabled, this overrides the default Drupal behavior for displaying farm assets at <em>farm/asset/%farm_asset</em>. If you add variants, you may use selection criteria such as farm asset type or language or user access to provide different views of farm assets. If no variant is selected, the default Drupal farm asset view will be used. This page only affects farm assets viewed as pages, it will not affect farm assets viewed in lists or at other locations. Also please note that if you are using pathauto, aliases may make a farm asset to be somewhere else, but as far as Drupal is concerned, they are still at farm/asset/%farm_asset.'),
'admin path' => 'farm/asset/%farm_asset',
// Menu hooks so that we can alter the farm/asset/%farm_asset menu entry to
// point to us.
'hook menu' => 'farm_asset_farm_asset_view_menu',
'hook menu alter' => 'farm_asset_farm_asset_view_menu_alter',
// This is task uses 'context' handlers and must implement these to give the
// handler data it needs.
'handler type' => 'context',
'get arguments' => 'farm_asset_farm_asset_view_get_arguments',
'get context placeholders' => 'farm_asset_farm_asset_view_get_contexts',
// Allow this to be enabled or disabled:
'disabled' => variable_get('farm_asset_farm_asset_view_disabled', TRUE),
'enable callback' => 'farm_asset_farm_asset_view_enable',
'access callback' => 'farm_asset_farm_asset_view_access_check',
);
}