ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
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\Style\Content;
22 
28 use ilRbacSystem;
31 
36 {
38 
39  protected ?\ilLogger $log = null;
40  protected Container $dic;
43 
44  public function __construct(
46  InternalRepoService $repo_service,
47  protected InternalDataService $data_service
48  ) {
49  $this->rbacsystem = $DIC->rbac()->system();
50  $this->repo_service = $repo_service;
51  $this->initDomainServices($DIC);
52  $this->dic = $DIC;
53  }
54 
55  // access manager
56  public function access(
57  int $ref_id = 0,
58  int $user_id = 0
60  return new StyleAccessManager(
61  $this->rbacsystem,
62  $ref_id,
63  $user_id
64  );
65  }
66 
67  public function characteristic(
68  int $style_id,
69  StyleAccessManager $access_manager
71  return new CharacteristicManager(
72  $style_id,
73  $access_manager,
74  $this->repo_service->characteristic(),
75  $this->repo_service->characteristicCopyPaste(),
76  $this->repo_service->color(),
77  $this->user()
78  );
79  }
80 
81  public function color(
82  int $style_id,
83  StyleAccessManager $access_manager
84  ): ColorManager {
85  return new ColorManager(
86  $style_id,
87  $access_manager,
88  $this->repo_service->characteristic(),
89  $this->repo_service->color()
90  );
91  }
92 
93  public function image(
94  int $style_id,
95  StyleAccessManager $access_manager
96  ): ImageManager {
97  return new ImageManager(
98  $style_id,
99  $access_manager,
100  $this->repo_service,
102  );
103  }
104 
106  {
107  return new ContainerManager(
108  $this->repo_service,
109  $ref_id
110  );
111  }
112 
117  public function object(int $ref_id, int $obj_id = 0): ObjectManager
118  {
119  return new ObjectManager(
120  $this->repo_service,
121  $this,
122  $ref_id,
123  $obj_id
124  );
125  }
126 
127  public function log(): \ilLogger
128  {
129  if (is_null($this->log)) {
130  $this->log = $this->logger()->styl();
131  }
132  return $this->log;
133  }
134 
135  public function cssBuilder(
136  \ilObjStyleSheet $style,
137  string $image_dir = ""
138  ): CSSBuilder {
139  return new CSSBuilder(
140  $style,
141  $image_dir
142  );
143  }
144 
145  public function style($style_id): StyleManager
146  {
147  return new StyleManager(
148  $this->data_service,
149  $this->repo_service,
150  $this,
152  $style_id
153  );
154  }
155 
156 }
color(int $style_id, StyleAccessManager $access_manager)
image(int $style_id, StyleAccessManager $access_manager)
Manages repository object related content style behaviour.
initDomainServices(\ILIAS\DI\Container $DIC)
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:35
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
object(int $ref_id, int $obj_id=0)
Objects without ref id (e.g.
$ref_id
Definition: ltiauth.php:65
Main business logic for content style images.
$log
Definition: result.php:32
characteristic(int $style_id, StyleAccessManager $access_manager)
global $DIC
Definition: shib_login.php:22
rbac()
Get interface to get interfaces to all things rbac.
Definition: Container.php:55
Main business logic for characteristics.
cssBuilder(\ilObjStyleSheet $style, string $image_dir="")
Manages access to content style editing.
__construct(Container $DIC, InternalRepoService $repo_service, protected InternalDataService $data_service)
Component logger with individual log levels by component id.