You are here

public function EntityReferenceRevisions::buildOptionsForm in Entity Reference Revisions 8

Same name in this branch
  1. 8 src/Plugin/views/style/EntityReferenceRevisions.php \Drupal\entity_reference_revisions\Plugin\views\style\EntityReferenceRevisions::buildOptionsForm()
  2. 8 src/Plugin/views/row/EntityReferenceRevisions.php \Drupal\entity_reference_revisions\Plugin\views\row\EntityReferenceRevisions::buildOptionsForm()

Overrides \Drupal\views\Plugin\views\style\StylePluginBase\StylePluginBase::buildOptionsForm().

Overrides StylePluginBase::buildOptionsForm

File

src/Plugin/views/style/EntityReferenceRevisions.php, line 53

Class

EntityReferenceRevisions
EntityReferenceRevisions style plugin.

Namespace

Drupal\entity_reference_revisions\Plugin\views\style

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);
  $options = $this->displayHandler
    ->getFieldLabels(TRUE);
  $form['search_fields'] = array(
    '#type' => 'checkboxes',
    '#title' => $this
      ->t('Search fields'),
    '#options' => $options,
    '#required' => TRUE,
    '#default_value' => $this->options['search_fields'],
    '#description' => $this
      ->t('Select the field(s) that will be searched when using the autocomplete widget.'),
    '#weight' => -3,
  );
}