ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
Copyright.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
29
31{
33 protected IdentifierHandler $identifier_handler;
34
36
37 public function __construct(
39 IdentifierHandler $identifier_handler,
41 ) {
42 $this->renderer = $renderer;
43 $this->identifier_handler = $identifier_handler;
44
45 $this->entry = $entry;
46 }
47
48 public function isDefault(): bool
49 {
50 return $this->entry->isDefault();
51 }
52
53 public function isOutdated(): bool
54 {
55 return $this->entry->isOutdated();
56 }
57
58 public function identifier(): string
59 {
60 return $this->identifier_handler->buildIdentifierFromEntryID($this->entry->id());
61 }
62
63 public function title(): string
64 {
65 return $this->entry->title();
66 }
67
68 public function description(): string
69 {
70 return $this->entry->description();
71 }
72
76 public function presentAsUIComponents(): array
77 {
78 return $this->renderer->toUIComponents($this->entry->copyrightData());
79 }
80
84 public function presentAsImageOnly(): ?Icon
85 {
86 return $this->renderer->toImageOnly($this->entry->copyrightData());
87 }
88
93 public function presentAsLinkOnly(): ?Link
94 {
95 return $this->renderer->toLinkOnly($this->entry->copyrightData());
96 }
97
98 public function presentAsString(): string
99 {
100 return $this->renderer->toString($this->entry->copyrightData());
101 }
102}
renderer()
presentAsImageOnly()
If the copyright does not have an image, null is returned.
Definition: Copyright.php:84
presentAsString()
The copyright without image in a reduced presentation, for displaying copyright where no UI component...
Definition: Copyright.php:98
presentAsLinkOnly()
If the copyright has no link, its full name is returned as a disabled link.
Definition: Copyright.php:93
__construct(RendererInterface $renderer, IdentifierHandler $identifier_handler, EntryInterface $entry)
Definition: Copyright.php:37
This describes how an icon could be modified during construction of UI.
Definition: Icon.php:29