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