You are here

protected function WebformGroupManager::getAllowedGroupRoleTokens in Webform 8.5

Same name and namespace in other branches
  1. 6.x modules/webform_group/src/WebformGroupManager.php \Drupal\webform_group\WebformGroupManager::getAllowedGroupRoleTokens()

Get allowed token group roles.

Return value

array An associative array containing allowed token group roles.

1 call to WebformGroupManager::getAllowedGroupRoleTokens()
WebformGroupManager::isGroupRoleTokenEnabled in modules/webform_group/src/WebformGroupManager.php
Determine if the group role token is enabled.

File

modules/webform_group/src/WebformGroupManager.php, line 128

Class

WebformGroupManager
Webform group manager manager.

Namespace

Drupal\webform_group

Code

protected function getAllowedGroupRoleTokens() {
  if (!isset($this->alloweGroupRoleTokens)) {
    $allowed_group_roles = $this->configFactory
      ->get('webform_group.settings')
      ->get('mail.group_roles');
    $this->alloweGroupRoleTokens = $allowed_group_roles ? array_combine($allowed_group_roles, $allowed_group_roles) : [];
  }
  return $this->alloweGroupRoleTokens;
}