You are here

function faqpanels_faq_term_page_manager_tasks in Panels Extras 7

Same name and namespace in other branches
  1. 6 faqpanels/plugins/tasks/faq_term.inc \faqpanels_faq_term_page_manager_tasks()

Specialized implementation of hook_page_manager_task_tasks(). See api-task.html for more information.

File

faqpanels/plugins/tasks/faq_term.inc, line 13
Provides additional page manager tasks FAQ page for panels use

Code

function faqpanels_faq_term_page_manager_tasks() {
  if (!module_exists('faq')) {
    return;
  }
  return array(
    // This is a 'page' task and will fall under the page admin UI
    'task type' => 'page',
    'title' => t('FAQ Page'),
    'admin title' => t('FAQ Page with categories'),
    'admin description' => t('when enabled, this overrides the default Drupal behavior of the FAQ page at <em>faq-page/%tid/%faq_display</em>'),
    'admin path' => 'faq-page/%tid/%faq_display',
    // Menu hooks so that we can alter the faq-page/%tid/%faq_display menu entry to point to us.
    'hook menu' => 'faqpanels_faq_term_menu',
    'hook menu alter' => 'faqpanels_faq_term_menu_alter',
    // This is task uses 'context' handlers and must implement these to give the
    // handler data it needs.
    'handler type' => 'context',
    'get arguments' => 'faqpanels_faq_term_get_arguments',
    'get context placeholders' => 'faqpanels_faq_term_get_contexts',
    // Allow this to be enabled or disabled:
    'disabled' => variable_get('faqpanels_faq_term_disabled', TRUE),
    'enable callback' => 'faqpanels_faq_term_enable',
  );
}