You are here

protected function Calendar::defineOptions in Calendar 8

Same name in this branch
  1. 8 src/Plugin/views/style/Calendar.php \Drupal\calendar\Plugin\views\style\Calendar::defineOptions()
  2. 8 src/Plugin/views/row/Calendar.php \Drupal\calendar\Plugin\views\row\Calendar::defineOptions()
Same name and namespace in other branches
  1. 8.2 src/Plugin/views/style/Calendar.php \Drupal\calendar\Plugin\views\style\Calendar::defineOptions()

Information about options for all kinds of purposes will be held here.


'option_name' => array(
 - 'default' => default value,
 - 'contains' => (optional) array of items this contains, with its own
     defaults, etc. If contains is set, the default will be ignored and
     assumed to be array().
 ),

Return value

array Returns the options of this handler/plugin.

Overrides StylePluginBase::defineOptions

File

src/Plugin/views/style/Calendar.php, line 188

Class

Calendar
Views style plugin for the Calendar module.

Namespace

Drupal\calendar\Plugin\views\style

Code

protected function defineOptions() {
  $options = parent::defineOptions();
  $options['calendar_type'] = [
    'default' => 'month',
  ];
  $options['name_size'] = [
    'default' => 3,
  ];
  $options['month_name_size'] = [
    'default' => 99,
  ];
  $options['mini'] = [
    'default' => 0,
  ];
  $options['link_to_date'] = [
    'default' => 1,
  ];
  $options['with_weekno'] = [
    'default' => 0,
  ];
  $options['multiday_theme'] = [
    'default' => 1,
  ];
  $options['theme_style'] = [
    'default' => 1,
  ];
  $options['max_items'] = [
    'default' => 0,
  ];
  $options['max_items_behavior'] = [
    'default' => 'more',
  ];
  $options['groupby_times'] = [
    'default' => 'hour',
  ];
  $options['groupby_times_custom'] = [
    'default' => '',
  ];
  $options['groupby_field'] = [
    'default' => '',
  ];
  $options['multiday_hidden'] = [
    'default' => [],
  ];
  $options['granularity_links'] = [
    'default' => [
      'day' => '',
      'week' => '',
      'month' => '',
    ],
  ];
  return $options;
}