ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ObjectReferenceCustomIconPresenter.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24{
25 private ?Custom $icon = null;
26
27 public function __construct(
28 private readonly int $obj_id,
29 private readonly Factory $factory
30 ) {
31 }
32
33 public function init(): void
34 {
35 $this->icon = $this->factory->getByObjId($this->lookupTargetId());
36 }
37
38 public function exists(): bool
39 {
40 return $this->icon->exists();
41 }
42
43 public function getFullPath(): string
44 {
45 return $this->icon->getFullPath();
46 }
47
48 protected function lookupTargetId(): int
49 {
50 return \ilContainerReference::_lookupTargetId($this->obj_id);
51 }
52}
factory()