You are here

public function CartBlock::blockForm in Ubercart 8.4

Overrides BlockPluginTrait::blockForm

File

uc_cart/src/Plugin/Block/CartBlock.php, line 109

Class

CartBlock
Provides the shopping cart block.

Namespace

Drupal\uc_cart\Plugin\Block

Code

public function blockForm($form, FormStateInterface $form_state) {
  $form['hide_empty'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Hide block if cart is empty.'),
    '#default_value' => $this->configuration['hide_empty'],
  ];
  $form['show_image'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Display the shopping cart icon in the block title.'),
    '#default_value' => $this->configuration['show_image'],
  ];
  $form['collapsible'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Make the shopping cart block collapsible by clicking the name or arrow.'),
    '#default_value' => $this->configuration['collapsible'],
  ];
  $form['collapsed'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Display the shopping cart block collapsed by default.'),
    '#default_value' => $this->configuration['collapsed'],
  ];
  return $form;
}