24 $rows = RoleRelationTable::getList([
30 foreach ($rows as $row)
32 $roleId = $row[
'ROLE_ID'];
33 $accessCode = $row[
'RELATION'];
35 $result[$roleId][$accessCode] =
true;
38 $result = $this->fillMembersInfo($result);
50 private function fillMembersInfo(array $rolesAccessCodes): array
52 $this->preloadProviderUserModels($rolesAccessCodes);
55 foreach ($rolesAccessCodes as $roleId => $accessCodes)
57 foreach ($accessCodes as $accessCode => $value)
59 $accessCodeObject =
new AccessCode($accessCode);
60 $entity = $provider->getEntity(
61 $accessCodeObject->getEntityType(),
62 $accessCodeObject->getEntityId()
65 $rolesAccessCodes[$roleId][$accessCode] = $entity->getMetaData();
69 return $rolesAccessCodes;
79 private function preloadProviderUserModels(array $rolesAccessCodes): void
83 foreach ($rolesAccessCodes as $accessCodes)
85 foreach ($accessCodes as $accessCode => $value)
87 $accessCodeObject =
new AccessCode($accessCode);
90 $userIds[] = $accessCodeObject->getEntityId();
static preLoadModels(array $filter)