You are here

public function CartBlock::blockForm in Commerce Cart Flyout 8

Overrides BlockPluginTrait::blockForm

File

src/Plugin/Block/CartBlock.php, line 88

Class

CartBlock
Provides a cart block.

Namespace

Drupal\commerce_cart_flyout\Plugin\Block

Code

public function blockForm($form, FormStateInterface $form_state) {
  $form = parent::blockForm($form, $form_state);
  $form['use_quantity_count'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Use an accumulative quantity of each item as item count.'),
    '#description' => $this
      ->t('Instead of counting the unique items in the cart this will show the sum of the quantity for all items in the cart.'),
    '#default_value' => $this->configuration['use_quantity_count'],
  ];
  return $form;
}