function CertificateEntityForm::exists in Certificate 4.x
File
- src/
Form/ CertificateEntityForm.php, line 34
Class
- CertificateEntityForm
- Form for certificate template.
Namespace
Drupal\certificate\FormCode
function exists($name) {
$entities = \Drupal::entityTypeManager()
->getStorage('certificate_template')
->loadByProperties([
'name' => $name,
]);
return (bool) $entities;
}