You are here

public function CartBlock::blockForm in Commerce Core 8.2

Overrides BlockPluginTrait::blockForm

File

modules/cart/src/Plugin/Block/CartBlock.php, line 86

Class

CartBlock
Provides a cart block.

Namespace

Drupal\commerce_cart\Plugin\Block

Code

public function blockForm($form, FormStateInterface $form_state) {
  $form['commerce_cart_dropdown'] = [
    '#type' => 'radios',
    '#title' => $this
      ->t('Display cart contents in a dropdown'),
    '#default_value' => (int) $this->configuration['dropdown'],
    '#options' => [
      $this
        ->t('No'),
      $this
        ->t('Yes'),
    ],
  ];
  return $form;
}