You are here

public function IcalDisplay::buildOptionsForm in Views iCal 8

Provide a form to edit options for this plugin.

Overrides Feed::buildOptionsForm

File

src/Plugin/views/display/IcalDisplay.php, line 95

Class

IcalDisplay
Provides a separate iCal display type.

Namespace

Drupal\views_ical\Plugin\views\display

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);
  switch ($form_state
    ->get('section')) {
    case 'path':
      $form['filename'] = [
        '#type' => 'textfield',
        '#title' => $this
          ->t('Filename'),
        '#default_value' => $this->options['filename'],
        '#description' => $this
          ->t('The filename that will be suggested to the browser for downloading purposes. You may include replacement patterns from the list below.'),
      ];

      // Support tokens.
      $this
        ->globalTokenForm($form, $form_state);
      break;
  }
}