Loading src/FullcalendarViewPreprocess.php +3 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,8 @@ class FullcalendarViewPreprocess { $left_buttons = Xss::filter($options['left_buttons']); // Right side buttons. $right_buttons = Xss::filter($options['right_buttons']); // Slot Duration. $slot_duration = empty($options['slotDuration']) ? '00:30:00' : Xss::filter($options['slotDuration']); $entries = []; if (!empty($start_field)) { Loading Loading @@ -349,6 +351,7 @@ class FullcalendarViewPreprocess { // Limits the number of events displayed on a day. 'eventLimit' => isset($options['eventLimit']) ? intval($options['eventLimit']) : 2, 'eventOverlap' => $options['allowEventOverlap'] !== 0, 'slotDuration' => $slot_duration, ]; // Dialog options. // Other modules can override following options by custom plugin. Loading src/Plugin/views/style/FullCalendarDisplay.php +10 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,7 @@ class FullCalendarDisplay extends StylePluginBase { $options['createEventLink'] = ['default' => 0]; $options['openEntityInNewTab'] = ['default' => 1]; $options['eventLimit'] = ['default' => 2]; $options['slotDuration'] = ['default' => '00:30:00']; return $options; } Loading Loading @@ -396,6 +397,15 @@ class FullCalendarDisplay extends StylePluginBase { '#title' => $this->t('Legend Colors'), '#description' => $this->t('Set color value of legends for each content type or each taxonomy.'), ]; $form['slotDuration'] = [ '#type' => 'textfield', '#fieldset' => 'display', '#title' => $this->t('Slot duration'), '#description' => $this->t('The frequency for displaying time slots.'), '#size' => 8, '#maxlength' => 8, '#default_value' => (isset($this->options['slotDuration'])) ? $this->options['slotDuration'] : '00:30:00', ]; $moduleHandler = \Drupal::service('module_handler'); if ($moduleHandler->moduleExists('taxonomy')) { Loading Loading
src/FullcalendarViewPreprocess.php +3 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,8 @@ class FullcalendarViewPreprocess { $left_buttons = Xss::filter($options['left_buttons']); // Right side buttons. $right_buttons = Xss::filter($options['right_buttons']); // Slot Duration. $slot_duration = empty($options['slotDuration']) ? '00:30:00' : Xss::filter($options['slotDuration']); $entries = []; if (!empty($start_field)) { Loading Loading @@ -349,6 +351,7 @@ class FullcalendarViewPreprocess { // Limits the number of events displayed on a day. 'eventLimit' => isset($options['eventLimit']) ? intval($options['eventLimit']) : 2, 'eventOverlap' => $options['allowEventOverlap'] !== 0, 'slotDuration' => $slot_duration, ]; // Dialog options. // Other modules can override following options by custom plugin. Loading
src/Plugin/views/style/FullCalendarDisplay.php +10 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,7 @@ class FullCalendarDisplay extends StylePluginBase { $options['createEventLink'] = ['default' => 0]; $options['openEntityInNewTab'] = ['default' => 1]; $options['eventLimit'] = ['default' => 2]; $options['slotDuration'] = ['default' => '00:30:00']; return $options; } Loading Loading @@ -396,6 +397,15 @@ class FullCalendarDisplay extends StylePluginBase { '#title' => $this->t('Legend Colors'), '#description' => $this->t('Set color value of legends for each content type or each taxonomy.'), ]; $form['slotDuration'] = [ '#type' => 'textfield', '#fieldset' => 'display', '#title' => $this->t('Slot duration'), '#description' => $this->t('The frequency for displaying time slots.'), '#size' => 8, '#maxlength' => 8, '#default_value' => (isset($this->options['slotDuration'])) ? $this->options['slotDuration'] : '00:30:00', ]; $moduleHandler = \Drupal::service('module_handler'); if ($moduleHandler->moduleExists('taxonomy')) { Loading