You are here

public function RawSQLArgument::buildOptionsForm in Views Raw SQL 8

Build the options form.

Overrides ArgumentPluginBase::buildOptionsForm

File

src/Plugin/views/argument/RawSQLArgument.php, line 59

Class

RawSQLArgument
Argument handler to accept a numeric range.

Namespace

Drupal\views_raw_sql\Plugin\views\argument

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);
  if ($this->account
    ->hasPermission('edit views raw sql')) {
    $form['where_raw_sql'] = [
      '#type' => 'textfield',
      '#title' => t('Raw SQL'),
      '#default_value' => $this->options['where_raw_sql'],
      '#weight' => -6,
    ];
  }
}