function ContactForm::save
Same name in other branches
- 3.x modules/content_entity_example/src/Form/ContactForm.php \Drupal\content_entity_example\Form\ContactForm::save()
- 4.0.x modules/content_entity_example/src/Form/ContactForm.php \Drupal\content_entity_example\Form\ContactForm::save()
File
-
content_entity_example/
src/ Form/ ContactForm.php, line 36
Class
- ContactForm
- Form controller for the content_entity_example entity edit forms.
Namespace
Drupal\content_entity_example\FormCode
public function save(array $form, FormStateInterface $form_state) {
$form_state->setRedirect('entity.content_entity_example_contact.collection');
$entity = $this->getEntity();
$entity->save();
}