function views_plugin_display_system::execute in Administration Views 7
Same name and namespace in other branches
- 6 plugins/views_plugin_display_system.inc \views_plugin_display_system::execute()
Overrides views_plugin_display::execute().
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
- plugins/
views_plugin_display_system.inc, line 334 - System display plugin.
Class
- views_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();
}
drupal_add_css(drupal_get_path('module', 'admin_views_system_display') . '/admin_views_system_display.css');
return $this->view
->render();
}