19declare(strict_types=1);
64 return $this->
settings->isCopyrightSelectionActive();
78 return $this->identifier_handler->isIdentifierValid($this->
getRawCopyright($reader));
89 if ($this->identifier_handler->isIdentifierValid($raw)) {
90 $entry = $this->copyright_repo->getEntry(
91 $this->identifier_handler->parseEntryIDFromIdentifier($raw)
93 } elseif ($raw ===
'') {
94 $entry = $this->copyright_repo->getDefaultEntry();
97 if (is_null($entry)) {
109 $this->identifier_handler->isIdentifierValid($copyright)
125 string $custom_copyright
135 if (!$this->isCopyrightSelectionActive()) {
139 foreach ($this->copyright_repo->getAllEntries() as $entry) {
140 yield $this->getCopyrightEntryWrapper($entry);
149 if (!$this->isCopyrightSelectionActive()) {
153 foreach ($this->copyright_repo->getActiveEntries() as $entry) {
154 yield $this->getCopyrightEntryWrapper($entry);
159 string $first_copyright_id,
160 string ...$further_copyright_ids
162 $selection_active = $this->isCopyrightSelectionActive();
163 $default_entry_id = 0;
164 if ($selection_active) {
165 $default_entry_id = $this->copyright_repo->getDefaultEntry()->id();
168 $copyright_search_clauses = [];
169 foreach ([$first_copyright_id, ...$further_copyright_ids] as $copyright_id) {
170 $copyright_search_clauses[] = $this->search_clause_factory->getBasicClause(
171 $this->getCopyrightDescriptionPath(),
177 !$selection_active ||
178 !$this->identifier_handler->isIdentifierValid($copyright_id) ||
179 $this->identifier_handler->parseEntryIDFromIdentifier($copyright_id) !== $default_entry_id
183 $copyright_search_clauses[] = $this->search_clause_factory->getBasicClause(
184 $this->getCopyrightDescriptionPath(),
190 return $this->search_clause_factory->getJoinedClauses(
192 ...$copyright_search_clauses
200 return $manipulator->prepareCreateOrUpdate(
201 $this->getCopyrightDescriptionPath(),
208 return $reader->
firstData($this->getCopyrightDescriptionPath())->value();
213 return $this->path_factory->custom()
214 ->withNextStep(
'rights')
215 ->withNextStep(
'description')
216 ->withNextStep(
'string')
224 $this->identifier_handler,
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...