You are here

public static function RegistrantsElementUtility::findElement in RNG - Events and Registrations 8.2

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

Traverses the triggering element tree until this element is found.

Parameters

array $form: The complete form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

array|null The element, or NULL if the element is not found.

12 calls to RegistrantsElementUtility::findElement()
RegistrantForm::ajaxRegistrantType in src/Form/Entity/RegistrantForm.php
Registrants::ajaxElementRoot in src/Element/Registrants.php
Ajax callback to return the entire element.
Registrants::submitChangeDefault in src/Element/Registrants.php
Submission callback to change the registrant from the default people.
Registrants::submitClose in src/Element/Registrants.php
Submission callback to close the selection interface.
Registrants::submitCreate in src/Element/Registrants.php
Submission callback for creating new entities.

... See full list

File

src/RegistrantsElementUtility.php, line 51

Class

RegistrantsElementUtility

Namespace

Drupal\rng

Code

public static function findElement(array $form, FormStateInterface $form_state) {
  return static::findElementWithProperties($form, $form_state, [
    '#identity_element_root' => TRUE,
  ]);
}