function party_page_view_piece_views in Party 7
Same name and namespace in other branches
- 8.2 party.pages.inc \party_page_view_piece_views()
Show a View display plugin as a party piece.
Parameters
$party: A party entity from the menu loader.
$view_name: The machine name of a view.
$view_display_id: The machine name of a view display.
1 string reference to 'party_page_view_piece_views'
- party_plugin_display_party_piece::execute_hook_party_party_pieces in includes/
views/ party_plugin_display_party_piece.inc - Returns items for hook_party_party_pieces().
File
- ./
party.pages.inc, line 244 - party.pages.inc
Code
function party_page_view_piece_views($party, $view_name, $view_display_id) {
if ($view = views_get_view($view_name)) {
if ($view
->access($view_display_id)) {
$view
->set_display($view_display_id);
if (isset($view->display_handler)) {
$view
->set_arguments(array(
$party->pid,
));
$output = $view
->execute_display($view_display_id);
// @todo:
//views_add_block_contextual_links($output, $view, $view_display_id);
$view
->destroy();
return $output;
}
}
$view
->destroy();
}
}