public function NextPreviousBlock::blockSubmit in Next Previous Post Block (Node or Page Pagination) 8.5
Same name and namespace in other branches
- 8 src/Plugin/Block/NextPreviousBlock.php \Drupal\nextpre\Plugin\Block\NextPreviousBlock::blockSubmit()
- 9.0.x src/Plugin/Block/NextPreviousBlock.php \Drupal\nextpre\Plugin\Block\NextPreviousBlock::blockSubmit()
- 1.0.x src/Plugin/Block/NextPreviousBlock.php \Drupal\nextpre\Plugin\Block\NextPreviousBlock::blockSubmit()
Adds block type-specific submission handling for the block form.
Note that this method takes the form structure and form state for the full block configuration form as arguments, not just the elements defined in BlockPluginInterface::blockForm().
Parameters
array $form: The form definition array for the full block configuration form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides BlockPluginTrait::blockSubmit
See also
\Drupal\Core\Block\BlockPluginInterface::blockForm()
\Drupal\Core\Block\BlockPluginInterface::blockValidate()
File
- src/
Plugin/ Block/ NextPreviousBlock.php, line 120
Class
- NextPreviousBlock
- Provides a 'Next Previous' block.
Namespace
Drupal\nextpre\Plugin\BlockCode
public function blockSubmit($form, FormStateInterface $form_state) {
$values = $form_state
->getValues();
$this->configuration['content_type'] = $form_state
->getValue('content_type');
$this->configuration['previous_text'] = $values['previous_text'];
$this->configuration['next_text'] = $values['next_text'];
$this->configuration['previouslink_class'] = $values['previouslink_class'];
$this->configuration['nextlink_class'] = $values['nextlink_class'];
}