/** * {@inheritdoc} */ public function submitForm(array &$form, FormStateInterface $form_state) { $this->page->removeAccessCondition($this->accessCondition->getConfiguration()['uuid']); $this->page->save(); drupal_set_message($this->t('The access condition %name has been removed.', ['%name' => $this->accessCondition->getPluginDefinition()['label']])); $form_state->setRedirectUrl($this->getCancelUrl()); }
/** * {@inheritdoc} */ public function submitForm(array &$form, FormStateInterface $form_state) { $this->block_visibility_group->removeCondition($this->condition->getConfiguration()['uuid']); $this->block_visibility_group->save(); drupal_set_message($this->t('The condition %name has been removed.', ['%name' => $this->condition->getPluginDefinition()['label']])); $this->setConditionRedirect($form_state); }