You are here

public function AggregatorFeedBlock::blockSubmit in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/aggregator/src/Plugin/Block/AggregatorFeedBlock.php \Drupal\aggregator\Plugin\Block\AggregatorFeedBlock::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 BlockBase::blockSubmit

See also

\Drupal\Core\Block\BlockPluginInterface::blockForm()

\Drupal\Core\Block\BlockPluginInterface::blockValidate()

File

core/modules/aggregator/src/Plugin/Block/AggregatorFeedBlock.php, line 139
Contains \Drupal\aggregator\Plugin\Block\AggregatorFeedBlock.

Class

AggregatorFeedBlock
Provides an 'Aggregator feed' block with the latest items from the feed.

Namespace

Drupal\aggregator\Plugin\Block

Code

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