You are here

public function PrivateMessageInboxBlock::blockSubmit in Private Message 8.2

Same name and namespace in other branches
  1. 8 src/Plugin/Block/PrivateMessageInboxBlock.php \Drupal\private_message\Plugin\Block\PrivateMessageInboxBlock::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/PrivateMessageInboxBlock.php, line 250

Class

PrivateMessageInboxBlock
Provides the private message inbox block.

Namespace

Drupal\private_message\Plugin\Block

Code

public function blockSubmit($form, FormStateInterface $form_state) {
  $this->configuration['thread_count'] = $form_state
    ->getValue('thread_count');
  $this->configuration['ajax_load_count'] = $form_state
    ->getValue('ajax_load_count');
  $this->configuration['ajax_refresh_rate'] = $form_state
    ->getValue('ajax_refresh_rate');
}