/**
  * {@inheritdoc}
  */
 public function submitForm(array &$form, FormStateInterface $form_state)
 {
     $this->displayVariant->removeBlock($this->block->getConfiguration()['uuid']);
     $this->page->save();
     drupal_set_message($this->t('The block %label has been removed.', ['%label' => $this->block->label()]));
     $form_state->setRedirectUrl($this->getCancelUrl());
 }
 /**
  * {@inheritdoc}
  */
 public function submitForm(array &$form, FormStateInterface $form_state)
 {
     $settings = (new FormState())->setValues($form_state->getValue('settings'));
     // Call the plugin submit handler.
     $this->block->submitConfigurationForm($form, $settings);
     // Update the original form values.
     $form_state->setValue('settings', $settings->getValues());
     if ($this->block instanceof ContextAwarePluginInterface) {
         $this->block->setContextMapping($form_state->getValue('context_mapping', []));
     }
     $this->displayVariant->updateBlock($this->block->getConfiguration()['uuid'], ['region' => $form_state->getValue('region')]);
     $this->page->save();
     $form_state->setRedirect('page_manager.display_variant_edit', ['page' => $this->page->id(), 'display_variant_id' => $this->displayVariant->id()]);
 }