You are here

public function EditQuantity::buildOptionsForm in Commerce Core 8.2

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

Overrides FieldPluginBase::buildOptionsForm

File

modules/cart/src/Plugin/views/field/EditQuantity.php, line 102

Class

EditQuantity
Defines a form element for editing the order item quantity.

Namespace

Drupal\commerce_cart\Plugin\views\field

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);
  $form['allow_decimal'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Allow decimal quantities'),
    '#default_value' => $this->options['allow_decimal'],
  ];
}