You are here

public function Block::blockSubmit in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/src/Plugin/views/display/Block.php \Drupal\views\Plugin\views\display\Block::blockSubmit()

Handles form submission for the views block configuration form.

Parameters

\Drupal\views\Plugin\Block\ViewsBlock $block: The ViewsBlock plugin.

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

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

File

core/modules/views/src/Plugin/views/display/Block.php, line 330
Contains \Drupal\views\Plugin\views\display\Block.

Class

Block
The plugin that handles a block.

Namespace

Drupal\views\Plugin\views\display

Code

public function blockSubmit(ViewsBlock $block, $form, FormStateInterface $form_state) {
  if ($items_per_page = $form_state
    ->getValue(array(
    'override',
    'items_per_page',
  ))) {
    $block
      ->setConfigurationValue('items_per_page', $items_per_page);
  }
  $form_state
    ->unsetValue(array(
    'override',
    'items_per_page',
  ));
}