function views_plugin_display_feed::attach_to

Attach to another view.

Overrides views_plugin_display::attach_to

File

plugins/views_plugin_display_feed.inc, line 233

Class

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

Code

public function attach_to($display_id) {
  $displays = $this->get_option('displays');
  if (empty($displays[$display_id])) {
    return;
  }
  // Defer to the feed style; it may put in meta information, and/or
  // attach a feed icon.
  $plugin = $this->get_plugin();
  if ($plugin) {
    $clone = $this->view
      ->clone_view();
    $clone->set_display($this->display->id);
    $clone->build_title();
    $plugin->attach_to($display_id, $this->get_path(), $clone->get_title());
    // Clean up.
    $clone->destroy();
    unset($clone);
  }
}