ILIAS  release_8 Revision v8.23
class.DomainService.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
21 namespace ILIAS\Survey\Execution;
22 
25 
30 {
33 
34  protected static array $managers = [];
35 
36  public function __construct(
37  InternalRepoService $repo_service,
38  InternalDomainService $domain_service
39  ) {
40  $this->domain_service = $domain_service;
41  $this->repo_service = $repo_service;
42  }
43 
44  public function run(
45  \ilObjSurvey $survey,
46  int $user_id,
47  int $appraisee_id = 0
48  ): RunManager {
49  if (!isset(self::$managers[RunManager::class][$survey->getId()][$user_id][$appraisee_id])) {
50  self::$managers[RunManager::class][$survey->getId()][$user_id][$appraisee_id] =
51  new RunManager(
52  $this->repo_service,
53  $this->domain_service,
54  $survey,
55  $user_id,
56  $appraisee_id
57  );
58  }
59  return self::$managers[RunManager::class][$survey->getId()][$user_id][$appraisee_id];
60  }
61 }
run(\ilObjSurvey $survey, int $user_id, int $appraisee_id=0)
__construct(InternalRepoService $repo_service, InternalDomainService $domain_service)
Survey Run Note: The manager should get the current user id passed.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...