You are here

public function GroupDeleteConfirm::submitForm in Paragraphs Browser 8

Form submission handler.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Overrides FormInterface::submitForm

File

src/Form/GroupDeleteConfirm.php, line 51

Class

GroupDeleteConfirm
Class CleanupUrlAliases.

Namespace

Drupal\paragraphs_browser\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this->entity
    ->groupManager()
    ->removeGroup($form_state
    ->getValue('id'));
  $form_state
    ->setRedirectUrl($this->entity
    ->toUrl('groups-form'));
}