function BlockContentForm::configureBlock
Same name in other branches
- 10 core/modules/block_content/src/BlockContentForm.php \Drupal\block_content\BlockContentForm::configureBlock()
Form submission handler for the 'configureBlock' action.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
File
-
core/
modules/ block_content/ src/ BlockContentForm.php, line 71
Class
- BlockContentForm
- Form handler for the content block edit forms.
Namespace
Drupal\block_contentCode
public function configureBlock(array $form, FormStateInterface $form_state) : void {
$block = $this->entity;
if (!($theme = $block->getTheme())) {
$theme = $this->config('system.theme')
->get('default');
}
$form_state->setRedirect('block.admin_add', [
'plugin_id' => 'block_content:' . $block->uuid(),
'theme' => $theme,
]);
$form_state->setIgnoreDestination();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.