You are here

public function RegistrantsElementUtility::getRegistrants in RNG - Events and Registrations 3.x

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

Gets registrant from form state.

Return value

\Drupal\rng\Entity\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 117

Class

RegistrantsElementUtility

Namespace

Drupal\rng

Code

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