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