You are here

public function RegistrantsElementUtility::getRegistrants in RNG - Events and Registrations 8

Same name and namespace in other branches
  1. 8.2 src/RegistrantsElementUtility.php \Drupal\rng\RegistrantsElementUtility::getRegistrants()
  2. 3.x src/RegistrantsElementUtility.php \Drupal\rng\RegistrantsElementUtility::getRegistrants()

Gets registrant from form state.

Return value

\Drupal\rng\RegistrantInterface[] An array of registrants.

3 calls to RegistrantsElementUtility::getRegistrants()
RegistrantsElementUtility::addRegistrant in src/RegistrantsElementUtility.php
RegistrantsElementUtility::identityExists in src/RegistrantsElementUtility.php
Determine if an identity is already used.
RegistrantsElementUtility::replaceFirstRegistrant in src/RegistrantsElementUtility.php

File

src/RegistrantsElementUtility.php, line 106

Class

RegistrantsElementUtility

Namespace

Drupal\rng

Code

public function getRegistrants() {
  return $this->formState
    ->get(array_merge($this->element['#parents'], [
    'registrants',
  ])) ?: $this->element['#value'];
}