You are here

function advanced_forum_forum_page_manager_tasks in Advanced Forum 6.2

Same name and namespace in other branches
  1. 7.2 plugins/tasks/forum.inc \advanced_forum_forum_page_manager_tasks()

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

File

plugins/tasks/forum.inc, line 7

Code

function advanced_forum_forum_page_manager_tasks() {
  return array(
    // This is a 'page' task and will fall under the page admin UI
    'task type' => 'page',
    'title' => t('Forum page'),
    'admin title' => t('Forum page'),
    'admin description' => t('When enabled, this overrides the default Drupal behavior for displaying forum listings at <em>forum</em> and <em>forum/%forum</em>. If you add variants, you may use selection criteria such as roles or user access to provide different views of the forums. If no variant is selected, the normal advanced forum view will be selected.'),
    'admin path' => 'forum/%forum',
    'hook menu' => 'advanced_forum_forum_menu',
    'hook menu alter' => 'advanced_forum_forum_menu_alter',
    // This is task uses 'context' handlers and must implement these to give the
    // handler data it needs.
    'handler type' => 'context',
    // handler type -- misnamed
    'get arguments' => 'advanced_forum_forum_get_arguments',
    'get context placeholders' => 'advanced_forum_forum_get_contexts',
    // Allow this to be enabled or disabled:
    'disabled' => variable_get('advanced_forum_forum_disabled', TRUE),
    'enable callback' => 'advanced_forum_forum_enable',
    // Allow additional operations
    'operations' => array(
      'settings' => array(
        'title' => t('Settings'),
        'description' => t('Edit name, path and other basic settings for the page.'),
        'form' => 'advanced_forum_forum_page_settings',
      ),
    ),
    // Even though we don't have subtasks, this allows us to save our settings.
    'save subtask callback' => 'advanced_forum_forum_page_save',
  );
}