public function WebformGroupManager::getCurrentUserGroupRoles in Webform 6.x
Same name and namespace in other branches
- 8.5 modules/webform_group/src/WebformGroupManager.php \Drupal\webform_group\WebformGroupManager::getCurrentUserGroupRoles()
Get the current user's group roles.
Return value
array|bool An array containing the current user's group roles. FALSE if no group content is found for the current request.
Overrides WebformGroupManagerInterface::getCurrentUserGroupRoles
File
- modules/
webform_group/ src/ WebformGroupManager.php, line 135
Class
- WebformGroupManager
- Webform group manager manager.
Namespace
Drupal\webform_groupCode
public function getCurrentUserGroupRoles() {
if (isset($this->currentGroupRoles)) {
return $this->currentGroupRoles;
}
$group_content = $this
->getCurrentGroupContent();
$this->currentGroupRoles = $group_content ? $this
->getUserGroupRoles($group_content, $this->currentUser) : [];
return $this->currentGroupRoles;
}