function Block::blockSubmit
Same name in other branches
- 9 core/modules/views/src/Plugin/views/display/Block.php \Drupal\views\Plugin\views\display\Block::blockSubmit()
- 8.9.x core/modules/views/src/Plugin/views/display/Block.php \Drupal\views\Plugin\views\display\Block::blockSubmit()
- 11.x 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.
See also
\Drupal\views\Plugin\Block\ViewsBlock::blockSubmit()
File
-
core/
modules/ views/ src/ Plugin/ views/ display/ Block.php, line 354
Class
- Block
- The plugin that handles a block.
Namespace
Drupal\views\Plugin\views\displayCode
public function blockSubmit(ViewsBlock $block, $form, FormStateInterface $form_state) {
if ($items_per_page = $form_state->getValue([
'override',
'items_per_page',
])) {
$block->setConfigurationValue('items_per_page', $items_per_page);
}
$form_state->unsetValue([
'override',
'items_per_page',
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.