ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.InternalDomainService.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\Glossary;
22
33
35{
36 use GlobalDICDomainServices;
37
38 protected static array $instance = [];
39
40 public function __construct(
42 protected InternalRepoService $repo_service,
43 protected InternalDataService $data_service
44 ) {
45 $this->initDomainServices($DIC);
46 }
47
48 public function log(): \ilLogger
49 {
50 return $this->logger()->glo();
51 }
52
53 public function term(\ilObjGlossary $glossary, int $user_id = 0): TermManager
54 {
55 if ($user_id == 0) {
56 $user_id = $this->user()->getId();
57 }
58 return new TermManager(
59 $this,
60 $this->repo_service->termSession(),
61 $glossary,
63 );
64 }
65
66 public function flashcard(int $glo_ref_id = 0, int $user_id = 0): FlashcardManager
67 {
68 if ($user_id == 0) {
69 $user_id = $this->user()->getId();
70 }
71 return new FlashcardManager(
72 $this,
73 $this->repo_service,
74 $this->data_service,
75 $glo_ref_id,
77 );
78 }
79
81 {
82 return new FlashcardShuffleManager();
83 }
84
85 public function metadata(): MetadataManager
86 {
87 return new MetadataManager($this->learningObjectMetadata());
88 }
89
90 public function presentation(\ilObjGlossary $glossary, int $user_id = 0): PresentationManager
91 {
92 if ($user_id == 0) {
93 $user_id = $this->user()->getId();
94 }
95 return new PresentationManager(
96 $this,
97 $this->repo_service->presentationSession(),
98 $glossary,
100 );
101 }
102
103 public function taxonomy(\ilObjGlossary $glossary): TaxonomyManager
104 {
105 return new TaxonomyManager(
106 $this->DIC->taxonomy()->domain(),
107 $glossary
108 );
109 }
110
111 public function table(): TableManager
112 {
113 return new TableManager();
114 }
115
117 {
118 return self::$instance["settings"] ??= new SettingsManager(
119 $this->data_service,
120 $this->repo_service,
121 $this
122 );
123 }
124
125}
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
presentation(\ilObjGlossary $glossary, int $user_id=0)
term(\ilObjGlossary $glossary, int $user_id=0)
__construct(Container $DIC, protected InternalRepoService $repo_service, protected InternalDataService $data_service)
flashcard(int $glo_ref_id=0, int $user_id=0)
Manages presentation of glossary content.
Component logger with individual log levels by component id.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
initDomainServices(\ILIAS\DI\Container $DIC)
global $DIC
Definition: shib_login.php:26