ILIAS  release_8 Revision v8.24
class.ilObjectReferenceCustomIconPresenter.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
22{
24 private ?ilObjectCustomIcon $icon = null;
25 private int $obj_id;
26
28 {
29 $this->factory = $factory;
30 $this->obj_id = $obj_id;
31 }
32
38 public function init(): void
39 {
40 $target_obj_id = $this->lookupTargetId();
41 $this->icon = $this->factory->getByObjId($target_obj_id);
42 }
43
44 public function exists(): bool
45 {
46 return $this->icon->exists();
47 }
48
49 public function getFullPath(): string
50 {
51 return $this->icon->getFullPath();
52 }
53
54 protected function lookupTargetId(): int
55 {
56 return ilContainerReference::_lookupTargetId($this->obj_id);
57 }
58}
static _lookupTargetId(int $a_obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
init()
Init ilObjectCustomIconPresenter If the target is invalid the icon instance creation is based on the ...
__construct(int $obj_id, ilObjectCustomIconFactory $factory)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...