You are here

public function EntityBundle::buildOptionsForm in Commerce Core 8.2

Same name in this branch
  1. 8.2 src/Plugin/views/filter/EntityBundle.php \Drupal\commerce\Plugin\views\filter\EntityBundle::buildOptionsForm()
  2. 8.2 src/Plugin/views/field/EntityBundle.php \Drupal\commerce\Plugin\views\field\EntityBundle::buildOptionsForm()

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

Overrides EntityField::buildOptionsForm

File

src/Plugin/views/field/EntityBundle.php, line 101

Class

EntityBundle
Displays the entity bundle.

Namespace

Drupal\commerce\Plugin\views\field

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);
  $form['hide_single_bundle'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t("Hide if there's only one bundle."),
    '#default_value' => $this->options['hide_single_bundle'],
  ];
}