function commerce_backoffice_content_plugin_display_system::execute in Commerce Backoffice 7
Build and render the page view.
Since we replace an existing page, we need to invoke views_set_page_view(). Also set the page title, because original page callbacks might do this.
Overrides views_plugin_display::execute
File
- includes/
views/ plugins/ commerce_backoffice_content_plugin_display_system.inc, line 202 - System display plugin.
Class
- commerce_backoffice_content_plugin_display_system
- Plugin to handle replacement of existing system paths.
Code
function execute() {
// Let the world know that this is the page view we're using.
views_set_page_view($this->view);
// Prior to this being called, the $view should already be set to this
// display, and arguments should be set on the view.
$this->view
->build();
if (!empty($this->view->build_info['fail'])) {
return drupal_not_found();
}
if (!empty($this->view->build_info['denied'])) {
return drupal_access_denied();
}
return $this->view
->render();
}