ILIAS  trunk Revision v11.0_alpha-2645-g16283d3b3f8
ObjectReferenceCustomIconPresenter.php
Go to the documentation of this file.
1 <?php
2 
19 declare(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()
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null