You are here

public function FullCalendar::process in FullCalendar 8.3

Same name and namespace in other branches
  1. 8.5 src/Plugin/fullcalendar/type/FullCalendar.php \Drupal\fullcalendar\Plugin\fullcalendar\type\FullCalendar::process()
  2. 8 src/Plugin/fullcalendar/type/FullCalendar.php \Drupal\fullcalendar\Plugin\fullcalendar\type\FullCalendar::process()
  3. 8.2 src/Plugin/fullcalendar/type/FullCalendar.php \Drupal\fullcalendar\Plugin\fullcalendar\type\FullCalendar::process()
  4. 8.4 src/Plugin/fullcalendar/type/FullCalendar.php \Drupal\fullcalendar\Plugin\fullcalendar\type\FullCalendar::process()

Overrides FullcalendarBase::process

File

src/Plugin/fullcalendar/type/FullCalendar.php, line 245

Class

FullCalendar
@todo.

Namespace

Drupal\fullcalendar\Plugin\fullcalendar\type

Code

public function process(&$settings) {
  static $fc_dom_id = 1;
  if (empty($this->style->view->dom_id)) {
    $this->style->view->dom_id = 'fc-' . $fc_dom_id++;
  }
  $options = $this->style->options;
  $options['gcal'] = [];

  /* @var \Drupal\Core\Field\FieldStorageDefinitionInterface $field */
  foreach ($this->style->view->field as $field) {
    if (!empty($field->field) && $field->field == 'gcal') {
      $options['gcal'][] = $field
        ->getSettings();
    }
  }
  unset($options['fields']);
  $settings += $options + [
    'view_name' => $this->style->view->storage
      ->id(),
    'view_display' => $this->style->view->current_display,
  ];
}