You are here

public function LingotekProfileEditForm::save in Lingotek Translation 8

Same name and namespace in other branches
  1. 8.2 src/Form/LingotekProfileEditForm.php \Drupal\lingotek\Form\LingotekProfileEditForm::save()
  2. 4.0.x src/Form/LingotekProfileEditForm.php \Drupal\lingotek\Form\LingotekProfileEditForm::save()
  3. 3.0.x src/Form/LingotekProfileEditForm.php \Drupal\lingotek\Form\LingotekProfileEditForm::save()
  4. 3.1.x src/Form/LingotekProfileEditForm.php \Drupal\lingotek\Form\LingotekProfileEditForm::save()
  5. 3.2.x src/Form/LingotekProfileEditForm.php \Drupal\lingotek\Form\LingotekProfileEditForm::save()
  6. 3.3.x src/Form/LingotekProfileEditForm.php \Drupal\lingotek\Form\LingotekProfileEditForm::save()
  7. 3.4.x src/Form/LingotekProfileEditForm.php \Drupal\lingotek\Form\LingotekProfileEditForm::save()
  8. 3.5.x src/Form/LingotekProfileEditForm.php \Drupal\lingotek\Form\LingotekProfileEditForm::save()
  9. 3.6.x src/Form/LingotekProfileEditForm.php \Drupal\lingotek\Form\LingotekProfileEditForm::save()
  10. 3.7.x src/Form/LingotekProfileEditForm.php \Drupal\lingotek\Form\LingotekProfileEditForm::save()
  11. 3.8.x src/Form/LingotekProfileEditForm.php \Drupal\lingotek\Form\LingotekProfileEditForm::save()

Form submission handler for the 'save' action.

Normally this method should be overridden to provide specific messages to the user and redirect the form after the entity has been saved.

Parameters

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

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

Return value

int Either SAVED_NEW or SAVED_UPDATED, depending on the operation performed.

Overrides EntityForm::save

File

src/Form/LingotekProfileEditForm.php, line 27
Contains \Drupal\lingotek\Form\LingotekProfileEditForm.

Class

LingotekProfileEditForm
Provides a form for lingotek profiles edition.

Namespace

Drupal\lingotek\Form

Code

public function save(array $form, FormStateInterface $form_state) {
  parent::save($form, $form_state);
  drupal_set_message($this
    ->t('The Lingotek profile has been successfully edited.'));
  $form_state
    ->setRedirect('lingotek.settings');
}