You are here

public function Feed::execute in Views (for Drupal 7) 8.3

Feeds do not go through the normal page theming mechanism. Instead, they go through their own little theme function and then return NULL so that Drupal believes that the page has already rendered itself...which it has.

Overrides Page::execute

File

lib/Drupal/views/Plugin/views/display/Feed.php, line 68
Definition of Drupal\views\Plugin\views\display\Feed.

Class

Feed
The plugin that handles a feed, such as RSS or atom.

Namespace

Drupal\views\Plugin\views\display

Code

public function execute() {
  $output = $this->view
    ->render();
  if (empty($output)) {
    throw new NotFoundHttpException();
  }
  $response = $this->view
    ->getResponse();
  $response
    ->setContent($output);
  return $response;
}