public function SidrTrigger::blockSubmit in Sidr: Accessible Mobile Menus 8.3
Same name and namespace in other branches
- 8 src/Plugin/Block/SidrTrigger.php \Drupal\sidr\Plugin\Block\SidrTrigger::blockSubmit()
- 8.2 src/Plugin/Block/SidrTrigger.php \Drupal\sidr\Plugin\Block\SidrTrigger::blockSubmit()
Overrides BlockPluginTrait::blockSubmit
File
- src/
Plugin/ Block/ SidrTrigger.php, line 249
Class
- SidrTrigger
- Provides a trigger button with Sidr integration.
Namespace
Drupal\sidr\Plugin\BlockCode
public function blockSubmit($form, FormStateInterface $form_state) {
parent::blockSubmit($form, $form_state);
$values = $form_state
->getValues();
$values = $values['basic'] + $values['advanced'];
$keys = array_keys($this
->defaultConfiguration());
foreach ($keys as $key) {
switch ($key) {
case 'sidr_renaming':
case 'sidr_displace':
case 'sidr_nocopy':
$this->configuration[$key] = (bool) $values[$key];
break;
default:
$this->configuration[$key] = $values[$key];
}
}
}