1 views_plugin_display_feed.inc views_plugin_display_feed::attach_to($display_id)

Attach to another view.

Overrides views_plugin_display::attach_to

File

core/modules/views/plugins/views_plugin_display_feed.inc, line 206
Contains the feed display plugin.

Class

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

Code

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);
  }
}