You are here

function crm_core_contact_view_page_manager_tasks in CRM Core 7

Same name and namespace in other branches
  1. 8 modules/crm_core_contact/legacy/plugins/tasks/view.inc \crm_core_contact_view_page_manager_tasks()
  2. 8.2 modules/crm_core_contact/legacy/plugins/tasks/view.inc \crm_core_contact_view_page_manager_tasks()

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

File

modules/crm_core_contact/plugins/tasks/view.inc, line 17
Handle the 'crm_core_contact view' override task.

Code

function crm_core_contact_view_page_manager_tasks() {
  return array(
    // This is a 'page' task and will fall under the page admin UI
    'task type' => 'page',
    'title' => t('Contact template'),
    'admin title' => t('Contact template'),
    'admin description' => t('When enabled, this overrides the default Drupal behavior for displaying contacts at <em>crm-core/contact/%crm_core_contact</em>. If you add variants, you may use selection criteria such as contact type or language or user access to provide different views of contacts. If no variant is selected, the default Drupal contact view will be used. This page only affects contacts viewed as pages, it will not affect contacts viewed in lists or at other locations. Also please note that if you are using pathauto, aliases may make a contact to be somewhere else, but as far as Drupal is concerned, they are still at crm-core/contact/%crm_core_contact.'),
    'admin path' => 'crm-core/contact/%crm_core_contact',
    // Menu hooks so that we can alter the crm-core/contact/%crm_core_contact menu entry to point to us.
    'hook menu' => 'crm_core_contact_view_menu',
    'hook menu alter' => 'crm_core_contact_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' => 'crm_core_contact_view_get_arguments',
    'get context placeholders' => 'crm_core_contact_view_get_contexts',
    // Allow this to be enabled or disabled:
    'disabled' => variable_get('page_manager_crm_core_contact_view_disabled', TRUE),
    'enable callback' => 'crm_core_contact_view_enable',
    'access callback' => 'crm_core_contact_view_access_check',
  );
}