ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.InternalDomainService.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
21 namespace ILIAS\Style\Content;
22 
28 use ilRbacSystem;
29 
34 {
36 
37  protected ?\ilLogger $log = null;
38  protected Container $dic;
42 
43  public function __construct(
45  InternalRepoService $repo_service,
46  InternalDataService $data_service
47  ) {
48  $this->rbacsystem = $DIC->rbac()->system();
49  $this->repo_service = $repo_service;
50  $this->initDomainServices($DIC);
51  $this->dic = $DIC;
52  }
53 
54  // access manager
55  public function access(
56  int $ref_id = 0,
57  int $user_id = 0
59  return new StyleAccessManager(
60  $this->rbacsystem,
61  $ref_id,
62  $user_id
63  );
64  }
65 
66  public function characteristic(
67  int $style_id,
68  StyleAccessManager $access_manager
70  return new CharacteristicManager(
71  $style_id,
72  $access_manager,
73  $this->repo_service->characteristic(),
74  $this->repo_service->characteristicCopyPaste(),
75  $this->repo_service->color(),
76  $this->user()
77  );
78  }
79 
80  public function color(
81  int $style_id,
82  StyleAccessManager $access_manager
83  ): ColorManager {
84  return new ColorManager(
85  $style_id,
86  $access_manager,
87  $this->repo_service->characteristic(),
88  $this->repo_service->color()
89  );
90  }
91 
92  public function image(
93  int $style_id,
94  StyleAccessManager $access_manager
95  ): ImageManager {
96  return new ImageManager(
97  $style_id,
98  $access_manager,
99  $this->repo_service->image()
100  );
101  }
102 
104  {
105  return new ContainerManager(
106  $this->repo_service,
107  $ref_id
108  );
109  }
110 
115  public function object(int $ref_id, int $obj_id = 0): ObjectManager
116  {
117  return new ObjectManager(
118  $this->repo_service,
119  $this,
120  $ref_id,
121  $obj_id
122  );
123  }
124 
125  public function log(): \ilLogger
126  {
127  if (is_null($this->log)) {
128  $this->log = $this->logger()->styl();
129  }
130  return $this->log;
131  }
132 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
color(int $style_id, StyleAccessManager $access_manager)
image(int $style_id, StyleAccessManager $access_manager)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Manages repository object related content style behaviour.
initDomainServices(\ILIAS\DI\Container $DIC)
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:31
Repository internal repo service.
global $DIC
Definition: feed.php:28
object(int $ref_id, int $obj_id=0)
Objects without ref id (e.g.
$ref_id
Definition: ltiauth.php:67
Main business logic for content style images.
$log
Definition: result.php:33
characteristic(int $style_id, StyleAccessManager $access_manager)
rbac()
Get interface to get interfaces to all things rbac.
Definition: Container.php:46
Main business logic for characteristics.
Repository internal data service.
Manages access to content style editing.
Component logger with individual log levels by component id.
__construct(Container $DIC, InternalRepoService $repo_service, InternalDataService $data_service)
Manages container related content style behaviour.