config = $config; $this->initialStateService = $initialStateService; $this->groupManager = $groupManager; } public function getForm(): TemplateResponse { $this->initialStateService->provideInitialState( 'printer', 'allowed_groups', $this->config->getAllowedGroupIds() ); $groups = $this->groupManager->search('', 100); $allowedGroups = $this->config->getAllowedGroupIds(); return new TemplateResponse('printer', 'settings/admin/allowed-groups', [ 'groups' => $groups, 'allowedGroups' => $allowedGroups, ], ''); } public function getSection(): string { return 'printer'; } public function getPriority(): int { return 10; } }