public function RegistrationTypeForm::exists in RNG - Events and Registrations 3.x
Same name and namespace in other branches
- 8.2 src/Form/RegistrationTypeForm.php \Drupal\rng\Form\RegistrationTypeForm::exists()
- 8 src/Form/RegistrationTypeForm.php \Drupal\rng\Form\RegistrationTypeForm::exists()
Callback for `id` form element in RegistrationTypeForm->buildForm.
File
- src/
Form/ RegistrationTypeForm.php, line 82
Class
- RegistrationTypeForm
- Form controller for registration types.
Namespace
Drupal\rng\FormCode
public function exists($entity_id, array $element, FormStateInterface $form_state) {
$query = $this->entityQueryFactory
->get('registration_type');
return (bool) $query
->condition('id', $entity_id)
->execute();
}