You are here

public function RegistrantForm::form in RNG - Events and Registrations 8.2

Same name and namespace in other branches
  1. 8 src/Form/Entity/RegistrantForm.php \Drupal\rng\Form\Entity\RegistrantForm::form()
  2. 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 24

Class

RegistrantForm
Form controller for registrants.

Namespace

Drupal\rng\Form\Entity

Code

public function form(array $form, FormStateInterface $form_state, RegistrantInterface $registrant = NULL) {
  $registrant = $this->entity;

  /** @var RegistrantFields $helper */
  $helper = new RegistrantFields($form, $form_state, $registrant);
  $form = $helper
    ->getFields($form, $form_state, $registrant);
  return $form;
}