/**
  * {@inheritdoc}
  */
 public function submitForm(array &$form, FormStateInterface $form_state)
 {
     $this->displayVariant->removeSelectionCondition($this->selectionCondition->getConfiguration()['uuid']);
     $this->page->save();
     drupal_set_message($this->t('The selection condition %name has been removed.', ['%name' => $this->selectionCondition->getPluginDefinition()['label']]));
     $form_state->setRedirectUrl($this->getCancelUrl());
 }
 /**
  * {@inheritdoc}
  */
 public function submitForm(array &$form, FormStateInterface $form_state)
 {
     parent::submitForm($form, $form_state);
     $configuration = $this->condition->getConfiguration();
     // If this selection condition is new, add it to the page.
     if (!isset($configuration['uuid'])) {
         $this->displayVariant->addSelectionCondition($configuration);
     }
     // Save the page entity.
     $this->page->save();
     $form_state->setRedirect('page_manager.display_variant_edit', ['page' => $this->page->id(), 'display_variant_id' => $this->displayVariant->id()]);
 }