public function Feed::attachTo

Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::attachTo().

Overrides DisplayPluginBase::attachTo

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/display/Feed.php, line 250
Contains \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 attachTo(ViewExecutable $clone, $display_id) {
  $displays = $this
    ->getOption('displays');
  if (empty($displays[$display_id])) {
    return;
  }

  // Defer to the feed style; it may put in meta information, and/or
  // attach a feed icon.
  $clone
    ->setDisplay($this->display['id']);
  $clone
    ->buildTitle();
  if ($plugin = $clone->display_handler
    ->getPlugin('style')) {
    $plugin
      ->attachTo($display_id, $this
      ->getPath(), $clone
      ->getTitle());
  }

  // Clean up.
  $clone
    ->destroy();
  unset($clone);
}