/**
  * {@inheritdoc}
  */
 public function submitForm(array &$form, array &$form_state)
 {
     $this->displayVariant->removeBlock($this->block->getConfiguration()['uuid']);
     $this->page->save();
     drupal_set_message($this->t('The block %name has been removed.', array('%name' => $this->block->getConfiguration()['label'])));
     if ($this->getRequest()->isXmlHttpRequest()) {
         $response = new AjaxResponse();
         $response->addCommand(new CloseDialogCommand());
         $response->addCommand(new LayoutBlockDelete($this->block));
         $form_state['response'] = $response;
         return $response;
     }
     $form_state['redirect_route'] = $this->getCancelRoute();
 }