public function YamlFormHandlerFormBase::exists in YAML Form 8
Determines if the form handler ID already exists.
Parameters
string $handler_id: The form handler ID.
Return value
bool TRUE if the form handler ID exists, FALSE otherwise.
File
- src/
Form/ YamlFormHandlerFormBase.php, line 231
Class
- YamlFormHandlerFormBase
- Provides a base form for form handlers.
Namespace
Drupal\yamlform\FormCode
public function exists($handler_id) {
$instance_ids = $this->yamlform
->getHandlers()
->getInstanceIds();
return isset($instance_ids[$handler_id]) ? TRUE : FALSE;
}