You are here

function calendar_plugin_display_ical::options_summary in Calendar 6.2

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

File

calendar_ical/calendar_plugin_display_ical.inc, line 73

Class

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

Code

function options_summary(&$categories, &$options) {

  // It is very important to call the parent function here:
  parent::options_summary($categories, $options);

  // Since we're childing off the 'page' type, we'll still *call* our
  // category 'page' but let's override it so it says feed settings.
  $categories['page'] = array(
    'title' => t('iCal settings'),
  );
  if ($this
    ->get_option('sitename_title')) {
    $options['title']['value'] = t('Using the site name');
  }

  // I don't think we want to give feeds menus directly.
  unset($options['menu']);
  $displays = array_filter($this
    ->get_option('displays'));
  if (count($displays) > 1) {
    $attach_to = t('Multiple displays');
  }
  else {
    if (count($displays) == 1) {
      $display = array_shift($displays);
      if (!empty($this->view->display[$display])) {
        $attach_to = $this->view->display[$display]->display_title;
      }
    }
  }
  if (!isset($attach_to)) {
    $attach_to = t('None');
  }
  $options['displays'] = array(
    'category' => 'page',
    'title' => t('Attach to'),
    'value' => $attach_to,
  );
}