You are here

public function CountBlock::blockSubmit in Basic cart 8.6

Same name and namespace in other branches
  1. 8.2 src/Plugin/Block/CountBlock.php \Drupal\basic_cart\Plugin\Block\CountBlock::blockSubmit()
  2. 8.3 src/Plugin/Block/CountBlock.php \Drupal\basic_cart\Plugin\Block\CountBlock::blockSubmit()
  3. 8.4 src/Plugin/Block/CountBlock.php \Drupal\basic_cart\Plugin\Block\CountBlock::blockSubmit()
  4. 8.5 src/Plugin/Block/CountBlock.php \Drupal\basic_cart\Plugin\Block\CountBlock::blockSubmit()

Overrides BlockPluginTrait::blockSubmit

File

src/Plugin/Block/CountBlock.php, line 121

Class

CountBlock
Provides a 'Basic Cart Count' block.

Namespace

Drupal\basic_cart\Plugin\Block

Code

public function blockSubmit($form, FormStateInterface $form_state) {
  parent::blockSubmit($form, $form_state);
  $values = $form_state
    ->getValues();
  $this->configuration['float'] = $values['float'];
  $this->configuration['top'] = $values['top'];
  $this->configuration['bottom'] = $values['bottom'];
  $this->configuration['left'] = $values['left'];
  $this->configuration['right'] = $values['right'];
  $this->configuration['size'] = $values['size'];
}