protected function RoleSplitFilter::getPermissions in Config Role Split 8
Get the permissions for a given role id.
Parameters
string $id: The role id.
Return value
string[] The permissions.
3 calls to RoleSplitFilter::getPermissions()
- RoleSplitFilter::filterRead in src/
Plugin/ ConfigFilter/ RoleSplitFilter.php - RoleSplitFilter::filterWrite in src/
Plugin/ ConfigFilter/ RoleSplitFilter.php - RoleSplitFilter::isManagedRole in src/
Plugin/ ConfigFilter/ RoleSplitFilter.php - Return whether the configuration is a managed role that needs filtering.
File
- src/
Plugin/ ConfigFilter/ RoleSplitFilter.php, line 150
Class
- RoleSplitFilter
- Provides a RoleSplitFilter.
Namespace
Drupal\config_role_split\Plugin\ConfigFilterCode
protected function getPermissions($id) {
$roles = $this
->getPluginProperty('roles', []);
// Here we could do more fancy things like wildcards.
if (array_key_exists($id, $roles) && !empty($roles[$id])) {
return $roles[$id];
}
return [];
}