You are here

public function UltimenuBlock::blockSubmit in Ultimenu 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Block/UltimenuBlock.php \Drupal\ultimenu\Plugin\Block\UltimenuBlock::blockSubmit()

Overrides \Drupal\block\BlockBase::blockSubmit().

Overrides BlockPluginTrait::blockSubmit

File

src/Plugin/Block/UltimenuBlock.php, line 133

Class

UltimenuBlock
Provides an 'Ultimenu' block.

Namespace

Drupal\ultimenu\Plugin\Block

Code

public function blockSubmit($form, FormStateInterface $form_state) {
  $this->configuration['skin'] = $form_state
    ->getValue('skin');
  $this->configuration['orientation'] = $form_state
    ->getValue('orientation');
  $this->configuration['submenu'] = $form_state
    ->getValue('submenu');
  $this->configuration['submenu_position'] = $form_state
    ->getValue('submenu_position');

  // Invalidate the library discovery cache to update the new skin discovery.
  \Drupal::service('library.discovery')
    ->clearCachedDefinitions();
}