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()

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 RowPluginBase::defineOptions

File

src/Plugin/views/row/Calendar.php, line 134

Class

Calendar
Plugin which creates a view on the resulting object and formats it as a Calendar entity.

Namespace

Drupal\calendar\Plugin\views\row

Code

protected function defineOptions() {
  $options = parent::defineOptions();
  $options['date_fields'] = [
    'default' => [],
  ];
  $options['colors'] = [
    'contains' => [
      'legend' => [
        'default' => '',
      ],
      'calendar_colors_type' => [
        'default' => [],
      ],
      'taxonomy_field' => [
        'default' => '',
      ],
      'calendar_colors_vocabulary' => [
        'default' => [],
      ],
      'calendar_colors_taxonomy' => [
        'default' => [],
      ],
      'calendar_colors_group' => [
        'default' => [],
      ],
    ],
  ];
  return $options;
}