ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.InternalGUIService.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
21 namespace ILIAS\Survey;
22 
28 
35 {
37 
38  protected \ilLanguage $lng;
41  protected ServerRequestInterface $request;
42  protected \ilObjUser $user;
43 
44  public function __construct(
45  \ilObjectServiceInterface $object_service,
46  ModeFactory $mode_factory,
47  InternalDomainService $domain_service
48  ) {
49  global $DIC;
50 
51  $this->initGUIServices($DIC);
52  $this->object_service = $object_service;
53  $this->mode_factory = $mode_factory;
54  $this->domain_service = $domain_service;
55 
56  $this->ctrl = $DIC->ctrl();
57  $this->ui = $DIC->ui();
58  $this->lng = $DIC->language();
59  $this->user = $DIC->user();
60  $this->request = $DIC->http()->request();
61  $this->main_tpl = $DIC->ui()->mainTemplate();
62  $this->http = $DIC->http();
63  }
64 
65  public function surveySettings(\ilObjSurvey $survey): Settings\UIFactory
66  {
67  return new Settings\UIFactory(
68  $this,
69  $this->object_service,
70  $survey,
71  $this->domain_service
72  );
73  }
74 
75  public function evaluation(\ilObjSurvey $survey): Evaluation\GUIService
76  {
77  return new Evaluation\GUIService(
78  $this,
79  $this->object_service,
80  $survey,
81  $this->domain_service
82  );
83  }
84 
85  public function editing(): Editing\GUIService
86  {
87  return new Editing\GUIService(
88  $this,
89  $this->domain_service
90  );
91  }
92 
93  public function execution(): Execution\GUIService
94  {
95  return new Execution\GUIService(
96  $this,
97  $this->domain_service
98  );
99  }
100 
101  public function infoScreen(
102  \ilObjSurveyGUI $survey_gui,
103  \ilToolbarGUI $toolbar
104  ): \ilInfoScreenGUI {
105  $info_screen = new InfoScreen\InfoScreenGUI(
106  $survey_gui,
107  $toolbar,
108  $this->user,
109  $this->lng,
110  $this->ctrl,
111  $this->request,
112  $this->domain_service
113  );
114 
115  return $info_screen->getInfoScreenGUI();
116  }
117 
118  public function modeUIModifier(int $mode): UIModifier
119  {
120  $mode_provider = $this->mode_factory->getModeById($mode);
121  return $mode_provider->getUIModifier();
122  }
123 
124  public function lng(): \ilLanguage
125  {
126  return $this->lng;
127  }
128 
129  public function print(): PrintView\GUIService
130  {
131  return new PrintView\GUIService(
132  $this,
133  $this->object_service,
134  $this->domain_service
135  );
136  }
137 }
Info screen wrapper for the survey.
Class ilInfoScreenGUI.
initGUIServices(\ILIAS\DI\Container $DIC)
global $DIC
Definition: feed.php:28
Class ilObjSurveyGUI.
infoScreen(\ilObjSurveyGUI $survey_gui, \ilToolbarGUI $toolbar)
static http()
Fetches the global http state from ILIAS.
__construct(\ilObjectServiceInterface $object_service, ModeFactory $mode_factory, InternalDomainService $domain_service)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...