public function YamlFormUiElementFormBase::exists in YAML Form 8
Determines if the form element key already exists.
Parameters
string $key: The form element key.
Return value
bool TRUE if the form element key, FALSE otherwise.
1 method overrides YamlFormUiElementFormBase::exists()
- YamlFormUiElementTestForm::exists in modules/
yamlform_ui/ src/ Form/ YamlFormUiElementTestForm.php - Determines if the form element key already exists.
File
- modules/
yamlform_ui/ src/ Form/ YamlFormUiElementFormBase.php, line 330
Class
- YamlFormUiElementFormBase
- Provides a base class for form element forms.
Namespace
Drupal\yamlform_ui\FormCode
public function exists($key) {
$elements = $this->yamlform
->getElementsInitializedAndFlattened();
return isset($elements[$key]) ? TRUE : FALSE;
}