public static function MaestroTemplateFormBase::exists in Maestro 3.x
Same name and namespace in other branches
- 8.2 src/Form/MaestroTemplateFormBase.php \Drupal\maestro\Form\MaestroTemplateFormBase::exists()
Internal method callback to determine if a template already exists.
File
- src/
Form/ MaestroTemplateFormBase.php, line 362
Class
- MaestroTemplateFormBase
- Class MaestroTemplateFormBase.
Namespace
Drupal\maestro\FormCode
public static function exists($submitted_value, array $element, FormStateInterface $form_state) {
$templates = MaestroEngine::getTemplates();
if (array_key_exists($submitted_value, $templates)) {
return TRUE;
}
return FALSE;
}