You are here

function party_page_view in Party 7

Same name and namespace in other branches
  1. 8.2 party.pages.inc \party_page_view()

Page callback to display a party.

@todo: replace this completely now we have party pieces as 2nd level tabs. this should be... what? basic info about the party like creation date, label, etc?

5 string references to 'party_page_view'
hook_party_party_pieces in ./party.api.php
Defines party pieces, that is, components of the party display.
party_menu in ./party.module
Implements hook_menu().
party_party_party_pieces in ./party.party_info.inc
Implements hook_party_party_pieces().
party_view_page_manager_menu_alter in plugins/tasks/party_view.inc
Alter the menu to put us in charge of party_view
party_view_page_manager_page in plugins/tasks/party_view.inc
Entry point for our overridden Party View

File

./party.pages.inc, line 13
party.pages.inc

Code

function party_page_view($party, $view_mode = 'full') {
  global $user;
  $party->content = array();
  $build = array();
  $build = module_invoke_all('party_page_view_alter', $party);

  // Demo output so we see this works.
  $build['demo'] = array(
    '#type' => 'markup',
    '#markup' => 'Party view page',
  );
  $controller = entity_get_controller('party');
  $build['party'] = $controller
    ->view(array(
    $party->pid => $party,
  ));
  return $build;
}