public function TestBlockInstantiation::blockSubmit

Adds block type-specific submission handling for the block form.

Note that this method takes the form structure and form state arrays for the full block configuration form as arguments, not just the elements defined in BlockBase::blockForm().

Parameters

array $form: The form definition array for the full block configuration form.

array $form_state: An array containing the current state of the configuration form.

Overrides BlockBase::blockSubmit

See also

\Drupal\block\BlockBase::blockForm()

\Drupal\block\BlockBase::blockValidate()

\Drupal\block\BlockBase::submit()

File

drupal/core/modules/block/tests/lib/Drupal/block_test/Plugin/Block/TestBlockInstantiation.php, line 56
Contains \Drupal\block_test\Plugin\Block\TestBlockInstantiation.

Class

TestBlockInstantiation
Provides a basic block for testing block instantiation and configuration.

Namespace

Drupal\block_test\Plugin\Block

Code

public function blockSubmit($form, &$form_state) {
  $this->configuration['display_message'] = $form_state['values']['display_message'];
}