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\Glossary;
22 
31 
36 {
38 
41 
42  public function __construct(
44  InternalRepoService $repo_service,
45  InternalDataService $data_service
46  ) {
47  $this->repo_service = $repo_service;
48  $this->data_service = $data_service;
49  $this->initDomainServices($DIC);
50  }
51 
52  public function log(): \ilLogger
53  {
54  return $this->logger()->glo();
55  }
56 
57  public function term(\ilObjGlossary $glossary, int $user_id = 0): TermManager
58  {
59  if ($user_id == 0) {
60  $user_id = $this->user()->getId();
61  }
62  return new TermManager(
63  $this,
64  $this->repo_service->termSession(),
65  $glossary,
66  $user_id
67  );
68  }
69 
70  public function flashcard(int $glo_ref_id = 0, int $user_id = 0): FlashcardManager
71  {
72  if ($user_id == 0) {
73  $user_id = $this->user()->getId();
74  }
75  return new FlashcardManager(
76  $this,
77  $this->repo_service,
78  $glo_ref_id,
79  $user_id
80  );
81  }
82 
84  {
85  return new FlashcardShuffleManager();
86  }
87 
88  public function metadata(): MetadataManager
89  {
90  return new MetadataManager();
91  }
92 
93  public function presentation(\ilObjGlossary $glossary, int $user_id = 0): PresentationManager
94  {
95  if ($user_id == 0) {
96  $user_id = $this->user()->getId();
97  }
98  return new PresentationManager(
99  $this,
100  $this->repo_service->presentationSession(),
101  $glossary,
102  $user_id
103  );
104  }
105 
106  public function taxonomy(\ilObjGlossary $glossary): TaxonomyManager
107  {
108  return new TaxonomyManager(
109  $this->DIC->taxonomy()->domain(),
110  $glossary
111  );
112  }
113 }
flashcard(int $glo_ref_id=0, int $user_id=0)
presentation(\ilObjGlossary $glossary, int $user_id=0)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $DIC, InternalRepoService $repo_service, InternalDataService $data_service)
initDomainServices(\ILIAS\DI\Container $DIC)
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:35
global $DIC
Definition: feed.php:28
Glossary internal repo service.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
term(\ilObjGlossary $glossary, int $user_id=0)
Manages presentation of glossary content.