You are here

protected function RoleSplitFilter::getSourcePermissions in Config Role Split 8

Get the permissions of the configuration in the source storage.

Parameters

string $id: The role id.

Return value

string[] The permissions of the role in the unfiltered storage.

1 call to RoleSplitFilter::getSourcePermissions()
RoleSplitFilter::filterWrite in src/Plugin/ConfigFilter/RoleSplitFilter.php

File

src/Plugin/ConfigFilter/RoleSplitFilter.php, line 213

Class

RoleSplitFilter
Provides a RoleSplitFilter.

Namespace

Drupal\config_role_split\Plugin\ConfigFilter

Code

protected function getSourcePermissions($id) {
  if ($this
    ->getSourceStorage()) {
    $config = $this
      ->getSourceStorage()
      ->read('user.role.' . $id);
    if (is_array($config)) {
      return $config['permissions'];
    }
  }
  return [];
}