You are here

function party_view_page_manager_page in Party 8.2

Same name and namespace in other branches
  1. 7 plugins/tasks/party_view.inc \party_view_page_manager_page()

Entry point for our overridden Party View

This function asks its assigned handlers who, if anyone, would like to run with it. If no one does, it passes through to Party's party_page_view()

1 string reference to 'party_view_page_manager_page'
party_view_page_manager_menu_alter in plugins/tasks/party_view.inc
Alter the menu to put us in charge of party_view

File

plugins/tasks/party_view.inc, line 76
Handle the 'party view' overrride task

Code

function party_view_page_manager_page($party) {

  // Load task plugin
  $task = page_manager_get_task('party_view');

  // Load the party into a context
  ctools_include('context');
  ctools_include('context-task-handler');
  $contexts = ctools_context_handler_get_task_contexts($task, '', array(
    $party,
  ));
  $output = ctools_context_handler_render($task, '', $contexts, array(
    $party->pid,
  ));
  if ($output != FALSE) {
    return $output;
  }
  $function = 'party_page_view';
  foreach (module_implements('page_manager_override') as $module) {
    $call = $module . '_page_manager_override';
    if (($rc = $call('party_view')) && function_exists($rc)) {
      $function = $rc;
      break;
    }
  }

  // If we're falling back to the standard, make sure party.pages.inc is
  // included
  if ($function == 'party_page_view') {
    module_load_include('inc', 'party', 'party.pages');
  }

  // Otherwise, fall back.
  return $function($party);
}