protected function YamlFormTemplatesController::isAdmin in YAML Form 8
Is the current user a form administrator.
Return value
bool TRUE if the current user has 'administer yamlform' or 'edit any yamlform' permission.
1 call to YamlFormTemplatesController::isAdmin()
- YamlFormTemplatesController::getTemplates in modules/
yamlform_templates/ src/ Controller/ YamlFormTemplatesController.php - Get form templates.
File
- modules/
yamlform_templates/ src/ Controller/ YamlFormTemplatesController.php, line 231
Class
- YamlFormTemplatesController
- Provides route responses for form templates.
Namespace
Drupal\yamlform_templates\ControllerCode
protected function isAdmin() {
return $this->currentUser
->hasPermission('administer yamlform') || $this->currentUser
->hasPermission('edit any yamlform');
}