getContainer()->getPermissionsService()->currentUserCanRead(Entities::SETTINGS)) { throw new AccessDeniedException('You are not allowed to read settings.'); } /** @var SettingsService $settingsService */ $settingsService = $this->getContainer()->get('domain.settings.service'); $settings = $settingsService->getAllSettingsCategorized(); $result->setResult(CommandResult::RESULT_SUCCESS); $result->setMessage('Successfully retrieved settings.'); $result->setData([ 'settings' => $settings ]); return $result; } }