You are here

public function JqueryCountdownTimerBlock::blockForm in jQuery Countdown Timer 8

Overrides BlockPluginTrait::blockForm

File

src/Plugin/Block/JqueryCountdownTimerBlock.php, line 34

Class

JqueryCountdownTimerBlock
Provides a "Jquery Countdown Timer" block.

Namespace

Drupal\jquery_countdown_timer\Plugin\Block

Code

public function blockForm($form, FormStateInterface $form_state) {
  $form['jquery_countdown_timer_date'] = [
    '#type' => 'datetime',
    '#title' => $this
      ->t('Timer date'),
    '#required' => 1,
    '#default_value' => new DrupalDateTime($this->configuration['countdown_datetime']),
    '#date_date_element' => 'date',
    '#date_time_element' => 'time',
    '#date_year_range' => '2016:+50',
  ];
  $form['jquery_countdown_timer_font_size'] = [
    '#type' => 'number',
    '#title' => $this
      ->t('Timer font size'),
    '#default_value' => $this->configuration['font_size'],
    '#required' => 1,
  ];
  return $form;
}