function page_manager_term_view_page_manager_tasks in Chaos Tool Suite (ctools) 7
Same name and namespace in other branches
- 6 page_manager/plugins/tasks/term_view.inc \page_manager_term_view_page_manager_tasks()
Specialized implementation of hook_page_manager_task_tasks(). See api-task.html for more information.
File
- page_manager/
plugins/ tasks/ term_view.inc, line 16 - Handle the 'term view' override task.
Code
function page_manager_term_view_page_manager_tasks() {
if (module_exists('taxonomy')) {
return array(
// This is a 'page' task and will fall under the page admin UI.
'task type' => 'page',
'title' => t('Taxonomy term template'),
'admin title' => t('Taxonomy term template'),
'admin description' => t('When enabled, this overrides the default Drupal behavior for displaying taxonomy terms at <em>taxonomy/term/%term</em>. If you add variants, you may use selection criteria such as vocabulary or user access to provide different displays of the taxonomy term and associated nodes. If no variant is selected, the default Drupal taxonomy term display will be used. This page only affects items actually displayed at taxonomy/term/%term. Some taxonomy terms, such as forums, have their displays moved elsewhere. Also please note that if you are using pathauto, aliases may make a taxonomy terms appear somewhere else, but as far as Drupal is concerned, they are still at taxonomy/term/%term.'),
'admin path' => 'taxonomy/term/%taxonomy_term',
'admin summary' => 'page_manager_term_view_admin_summary',
// Menu hooks so that we can alter the term/%term menu entry to point to us.
'hook menu' => 'page_manager_term_view_menu',
'hook menu alter' => 'page_manager_term_view_menu_alter',
// Provide a setting to the primary settings UI for Panels.
'admin settings' => 'page_manager_term_view_admin_settings',
// Even though we don't have subtasks, this allows us to save our settings.
'save subtask callback' => 'page_manager_term_view_save',
// Callback to add items to the page manager task administration form:
'task admin' => 'page_manager_term_view_task_admin',
// This is task uses 'context' handlers and must implement these to give the
// handler data it needs.
'handler type' => 'context',
'get arguments' => 'page_manager_term_view_get_arguments',
'get context placeholders' => 'page_manager_term_view_get_contexts',
// Allow this to be enabled or disabled:
'disabled' => variable_get('page_manager_term_view_disabled', TRUE),
'enable callback' => 'page_manager_term_view_enable',
'access callback' => 'page_manager_term_view_access_check',
// Allow additional operations.
'operations' => array(
'settings' => array(
'title' => t('Settings'),
'description' => t('Edit name, path and other basic settings for the page.'),
'form' => 'page_manager_term_view_settings',
),
),
);
}
}