public function RegistrantsElementUtility::clearPeopleFormInput in RNG - Events and Registrations 3.x
Same name and namespace in other branches
- 8.2 src/RegistrantsElementUtility.php \Drupal\rng\RegistrantsElementUtility::clearPeopleFormInput()
- 8 src/RegistrantsElementUtility.php \Drupal\rng\RegistrantsElementUtility::clearPeopleFormInput()
Clear user input from people sub-forms.
File
- src/
RegistrantsElementUtility.php, line 198
Class
Namespace
Drupal\rngCode
public function clearPeopleFormInput() {
$autocomplete_tree = array_merge($this->element['#parents'], [
'entities',
'person',
'existing',
'existing_autocomplete',
]);
NestedArray::unsetValue($this->formState
->getUserInput(), $autocomplete_tree);
$registrant_tree = array_merge($this->element['#parents'], [
'entities',
'person',
'registrant',
]);
NestedArray::unsetValue($this->formState
->getUserInput(), $registrant_tree);
$new_entity_tree = array_merge($this->element['#parents'], [
'entities',
'person',
'new_person',
'newentityform',
]);
NestedArray::unsetValue($this->formState
->getUserInput(), $new_entity_tree);
}