You are here

public function StringListField::buildOptionsForm in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/options/src/Plugin/views/argument/StringListField.php \Drupal\options\Plugin\views\argument\StringListField::buildOptionsForm()

Provide a form to edit options for this plugin.

Overrides StringArgument::buildOptionsForm

File

core/modules/options/src/Plugin/views/argument/StringListField.php, line 61
Contains \Drupal\options\Plugin\views\argument\StringListField.

Class

StringListField
Argument handler for list field to show the human readable name in summary.

Namespace

Drupal\options\Plugin\views\argument

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);
  $form['summary']['human'] = [
    '#title' => $this
      ->t('Display list value as human readable'),
    '#type' => 'checkbox',
    '#default_value' => $this->options['summary']['human'],
    '#states' => [
      'visible' => [
        ':input[name="options[default_action]"]' => [
          'value' => 'summary',
        ],
      ],
    ],
  ];
}