diff --git a/core/modules/block/src/BlockForm.php b/core/modules/block/src/BlockForm.php index 70ea841..b312575 100644 --- a/core/modules/block/src/BlockForm.php +++ b/core/modules/block/src/BlockForm.php @@ -335,6 +335,7 @@ protected function validateVisibility(array $form, FormStateInterface $form_stat public function submitForm(array &$form, FormStateInterface $form_state) { parent::submitForm($form, $form_state); + $entity = $this->entity; // The Block Entity form puts all block plugin form elements in the // settings form element, so just pass that to the block for submission. // @todo Find a way to avoid this manipulation. @@ -354,7 +355,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { $this->submitVisibility($form, $form_state); // Save the settings of the plugin. - $this->entity->save(); + $entity->save(); drupal_set_message($this->t('The block configuration has been saved.')); $form_state->setRedirect(