authorizationRepository = $authorizationRepository; } public function loadAuthorizations(): array { $authorizations = $this->authorizationRepository->list(); $view = []; if (!empty($authorizations)) { foreach ($authorizations as $auth) { $view[] = new AuthorizationListView( $auth['code'], $auth['access'], new ProfileIdView( $auth['profile_id'] ), $auth['enabled'] ); } } return $view; } }