public function SimpleSearchFormBlock::blockSubmit in Simple search form 8
Overrides BlockPluginTrait::blockSubmit
File
- src/
Plugin/ Block/ SimpleSearchFormBlock.php, line 229
Class
- SimpleSearchFormBlock
- Provides a 'SimpleSearchFormBlock' block.
Namespace
Drupal\simple_search_form\Plugin\BlockCode
public function blockSubmit($form, FormStateInterface $form_state) {
$this->configuration['action_path'] = $form_state
->getValue('action_path');
$this->configuration['get_parameter'] = $form_state
->getValue('get_parameter');
$this->configuration['input_type'] = $form_state
->getValue('input_type');
$this->configuration['input_label'] = $form_state
->getValue('input_label');
$this->configuration['input_label_display'] = $form_state
->getValue('input_label_display');
$this->configuration['input_placeholder'] = $form_state
->getValue('input_placeholder');
$this->configuration['input_css_classes'] = $form_state
->getValue('input_css_classes');
$this->configuration['submit_display'] = $form_state
->getValue('submit_display');
$this->configuration['submit_label'] = $form_state
->getValue('submit_label');
$this->configuration['input_keep_value'] = $form_state
->getValue('input_keep_value');
$this->configuration['search_api_autocomplete'] = $this->moduleHandler
->moduleExists('search_api_autocomplete') ? $form_state
->getValue('search_api_autocomplete') : [];
}