You are here

public function GroupEditForm::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/GroupEditForm.php, line 76
Contains \Drupal\paragraphs_browser\Form\GroupEditForm.

Class

GroupEditForm
Class CleanupUrlAliases.

Namespace

Drupal\paragraphs_browser\Form

Code

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