public function LingotekProfileAddForm::save in Lingotek Translation 8
Same name and namespace in other branches
- 8.2 src/Form/LingotekProfileAddForm.php \Drupal\lingotek\Form\LingotekProfileAddForm::save()
- 4.0.x src/Form/LingotekProfileAddForm.php \Drupal\lingotek\Form\LingotekProfileAddForm::save()
- 3.0.x src/Form/LingotekProfileAddForm.php \Drupal\lingotek\Form\LingotekProfileAddForm::save()
- 3.1.x src/Form/LingotekProfileAddForm.php \Drupal\lingotek\Form\LingotekProfileAddForm::save()
- 3.2.x src/Form/LingotekProfileAddForm.php \Drupal\lingotek\Form\LingotekProfileAddForm::save()
- 3.3.x src/Form/LingotekProfileAddForm.php \Drupal\lingotek\Form\LingotekProfileAddForm::save()
- 3.4.x src/Form/LingotekProfileAddForm.php \Drupal\lingotek\Form\LingotekProfileAddForm::save()
- 3.5.x src/Form/LingotekProfileAddForm.php \Drupal\lingotek\Form\LingotekProfileAddForm::save()
- 3.6.x src/Form/LingotekProfileAddForm.php \Drupal\lingotek\Form\LingotekProfileAddForm::save()
- 3.7.x src/Form/LingotekProfileAddForm.php \Drupal\lingotek\Form\LingotekProfileAddForm::save()
- 3.8.x src/Form/LingotekProfileAddForm.php \Drupal\lingotek\Form\LingotekProfileAddForm::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/ LingotekProfileAddForm.php, line 20 - Contains \Drupal\lingotek\Form\LingotekProfileAddForm.
Class
- LingotekProfileAddForm
- Provides a form for lingotek profiles addition.
Namespace
Drupal\lingotek\FormCode
public function save(array $form, FormStateInterface $form_state) {
parent::save($form, $form_state);
drupal_set_message($this
->t('The Lingotek profile has been successfully saved.'));
$form_state
->setRedirect('lingotek.settings');
}