You are here

public function TestRichTextBlock::blockSubmit in Lingotek Translation 4.0.x

Same name and namespace in other branches
  1. 3.3.x tests/modules/lingotek_test/src/Plugin/Block/TestRichTextBlock.php \Drupal\lingotek_test\Plugin\Block\TestRichTextBlock::blockSubmit()
  2. 3.4.x tests/modules/lingotek_test/src/Plugin/Block/TestRichTextBlock.php \Drupal\lingotek_test\Plugin\Block\TestRichTextBlock::blockSubmit()
  3. 3.5.x tests/modules/lingotek_test/src/Plugin/Block/TestRichTextBlock.php \Drupal\lingotek_test\Plugin\Block\TestRichTextBlock::blockSubmit()
  4. 3.6.x tests/modules/lingotek_test/src/Plugin/Block/TestRichTextBlock.php \Drupal\lingotek_test\Plugin\Block\TestRichTextBlock::blockSubmit()
  5. 3.7.x tests/modules/lingotek_test/src/Plugin/Block/TestRichTextBlock.php \Drupal\lingotek_test\Plugin\Block\TestRichTextBlock::blockSubmit()
  6. 3.8.x tests/modules/lingotek_test/src/Plugin/Block/TestRichTextBlock.php \Drupal\lingotek_test\Plugin\Block\TestRichTextBlock::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

tests/modules/lingotek_test/src/Plugin/Block/TestRichTextBlock.php, line 37

Class

TestRichTextBlock
Provides a 'Lingotek Test Rich Text' block.

Namespace

Drupal\lingotek_test\Plugin\Block

Code

public function blockSubmit($form, FormStateInterface $form_state) {
  parent::blockSubmit($form, $form_state);
  $this->configuration['rich_text'] = $form_state
    ->getValue('rich_text');
}