You are here

public function SelectForm::buildOptionsForm in Entity Browser 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/views/field/SelectForm.php \Drupal\entity_browser\Plugin\views\field\SelectForm::buildOptionsForm()

Default options form that provides the label widget that all fields should have.

Overrides FieldPluginBase::buildOptionsForm

File

src/Plugin/views/field/SelectForm.php, line 83

Class

SelectForm
Defines a bulk operation form element that works with entity browser.

Namespace

Drupal\entity_browser\Plugin\views\field

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);
  $form['use_field_cardinality'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Use field cardinality'),
    '#default_value' => $this->options['use_field_cardinality'],
    '#description' => $this
      ->t('If the view is used in a context where cardinality is 1, use radios instead of checkboxes.'),
  ];
}