/** * {@inheritdoc} */ public function submitForm(array &$form, FormStateInterface $form_state) { $this->pageVariant->removeSelectionCondition($this->selectionCondition->getConfiguration()['uuid']); $this->pageVariant->save(); drupal_set_message($this->t('The selection condition %name has been removed.', ['%name' => $this->selectionCondition->getPluginDefinition()['label']])); $form_state->setRedirectUrl($this->getCancelUrl()); }