You are here

public function RoleExpireApiService::getRolesAfterExpiration in Role Expire 8

Same name and namespace in other branches
  1. 2.x src/RoleExpireApiService.php \Drupal\role_expire\RoleExpireApiService::getRolesAfterExpiration()

Get roles to assign on expiration (global configuration).

Return value

array Returns an array where the key is the original rid and the value the one that has to be assigned on expiration. The array will be empty if configuration is not set.

File

src/RoleExpireApiService.php, line 268

Class

RoleExpireApiService
Class RoleExpireApiService.

Namespace

Drupal\role_expire

Code

public function getRolesAfterExpiration() {
  $values_raw = $this->config
    ->get('role_expire.config')
    ->get('role_expire_default_roles');
  $values = empty($values_raw) ? [] : json_decode($values_raw, TRUE);
  return $values;
}