ILIAS  release_8 Revision v8.23
class.InternalDomainService.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
21 namespace ILIAS\Survey;
22 
29 
35 {
37 
41 
42  public function __construct(
43  ModeFactory $mode_factory,
44  InternalRepoService $repo_service,
45  InternalDataService $data_service
46  ) {
47  global $DIC;
48 
49  $this->initDomainServices($DIC);
50  $this->repo_tree = $DIC->repositoryTree();
51  $this->access = $DIC->access();
52  $this->lng = $DIC->language();
53 
54  $this->repo_service = $repo_service;
55  $this->data_service = $data_service;
56 
57  $this->mode_factory = $mode_factory;
58  }
59 
60  public function log(): \ilLogger
61  {
62  return $this->logger()->svy();
63  }
64 
65  public function modeFeatureConfig(int $mode): FeatureConfig
66  {
67  $mode_provider = $this->mode_factory->getModeById($mode);
68  return $mode_provider->getFeatureConfig();
69  }
70 
71  public function participants(): Participants\DomainService
72  {
73  return new Participants\DomainService(
74  $this,
75  $this->repo_service
76  );
77  }
78 
79  public function execution(): Execution\DomainService
80  {
81  return new Execution\DomainService(
82  $this->repo_service,
83  $this
84  );
85  }
86 
87  public function access(int $ref_id, int $user_id): Access\AccessManager
88  {
89  return new Access\AccessManager(
90  $this,
91  $this->access,
92  $ref_id,
93  $user_id
94  );
95  }
96 
97  public function code(\ilObjSurvey $survey, int $user_id): CodeManager
98  {
99  return new CodeManager(
100  $this->repo_service->code(),
102  $survey,
103  $this,
104  $user_id
105  );
106  }
107 
108  public function evaluation(
109  \ilObjSurvey $survey,
110  int $user_id,
111  int $requested_appr_id = 0,
112  string $requested_rater_id = ""
113  ): Evaluation\EvaluationManager {
114  return new Evaluation\EvaluationManager(
115  $this,
116  $this->repo_service,
117  $survey,
118  $user_id,
119  $requested_appr_id,
120  $requested_rater_id
121  );
122  }
123 
124  public function edit(): EditManager
125  {
126  return new EditManager(
127  $this->repo_service,
128  $this
129  );
130  }
131 
132  public function sequence(int $survey_id, \ilObjSurvey $survey): SequenceManager
133  {
134  return new SequenceManager(
135  $this->repo_service,
136  $this,
137  $survey_id,
138  $survey
139  );
140  }
141 
142 }
code(\ilObjSurvey $survey, int $user_id)
initDomainServices(\ILIAS\DI\Container $DIC)
sequence(int $survey_id, \ilObjSurvey $survey)
global $DIC
Definition: feed.php:28
$ref_id
Definition: ltiauth.php:67
__construct(ModeFactory $mode_factory, InternalRepoService $repo_service, InternalDataService $data_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...
evaluation(\ilObjSurvey $survey, int $user_id, int $requested_appr_id=0, string $requested_rater_id="")