You are here

function calendar_plugin_display_ical::attach_to in Calendar 6.2

Same name and namespace in other branches
  1. 7 calendar_ical/calendar_plugin_display_ical.inc \calendar_plugin_display_ical::attach_to()
  2. 7.2 calendar_ical/calendar_plugin_display_ical.inc \calendar_plugin_display_ical::attach_to()

Attach to another view.

File

calendar_ical/calendar_plugin_display_ical.inc, line 174

Class

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