public function RegistrantForm::form in RNG - Events and Registrations 8
Same name and namespace in other branches
- 8.2 src/Form/Entity/RegistrantForm.php \Drupal\rng\Form\Entity\RegistrantForm::form()
- 3.x src/Form/Entity/RegistrantForm.php \Drupal\rng\Form\Entity\RegistrantForm::form()
Gets the actual form array to be built.
Overrides ContentEntityForm::form
See also
\Drupal\Core\Entity\EntityForm::processForm()
\Drupal\Core\Entity\EntityForm::afterBuild()
File
- src/
Form/ Entity/ RegistrantForm.php, line 17
Class
- RegistrantForm
- Form controller for registrants.
Namespace
Drupal\rng\Form\EntityCode
public function form(array $form, FormStateInterface $form_state, RegistrantInterface $registrant = NULL) {
$form = parent::form($form, $form_state);
$registrant = $this->entity;
if ($registrant && !$registrant
->isNew()) {
$form['#title'] = $this
->t('Edit registrant');
}
return $form;
}