You are here

public function ViewsDateFormatSqlArgument::buildOptionsForm in Views Date Format SQL 8.3

Provide a form to edit options for this plugin.

Overrides NumericArgument::buildOptionsForm

File

src/Plugin/views/argument/ViewsDateFormatSqlArgument.php, line 42

Class

ViewsDateFormatSqlArgument
An argument that filters entity timestamp field data.

Namespace

Drupal\views_date_format_sql\Plugin\views\argument

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  $form['format_date_sql'] = array(
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Use SQL to format date'),
    '#description' => $this
      ->t('Use the SQL databse to format the date. This enables date values to be used in grouping aggregation.'),
    '#default_value' => $this->options['format_date_sql'],
  );
  $form['format_string'] = array(
    '#type' => 'textfield',
    '#title' => $this
      ->t('Date Format'),
    '#description' => $this
      ->t('Use the SQL database to format the date. This enables date values to be used in grouping aggregation.'),
    '#default_value' => $this->options['format_string'],
  );
  parent::buildOptionsForm($form, $form_state);
}