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
132 $entry = $this->copyright_repo->getEntry(
133 $this->identifier_handler->parseEntryIDFromIdentifier($copyright_id)
135 return $this->getCopyrightEntryWrapper($entry);
143 if (!$this->isCopyrightSelectionActive()) {
147 foreach ($this->copyright_repo->getAllEntries() as $entry) {
148 yield $this->getCopyrightEntryWrapper($entry);
157 if (!$this->isCopyrightSelectionActive()) {
161 foreach ($this->copyright_repo->getActiveEntries() as $entry) {
162 yield $this->getCopyrightEntryWrapper($entry);
167 string $first_copyright_id,
168 string ...$further_copyright_ids
170 $selection_active = $this->isCopyrightSelectionActive();
171 $default_entry_id = 0;
172 if ($selection_active) {
173 $default_entry_id = $this->copyright_repo->getDefaultEntry()->id();
176 $copyright_search_clauses = [];
177 foreach ([$first_copyright_id, ...$further_copyright_ids] as $copyright_id) {
178 $copyright_search_clauses[] = $this->search_clause_factory->getBasicClause(
179 $this->getCopyrightDescriptionPath(),
185 !$selection_active ||
186 !$this->identifier_handler->isIdentifierValid($copyright_id) ||
187 $this->identifier_handler->parseEntryIDFromIdentifier($copyright_id) !== $default_entry_id
191 $copyright_search_clauses[] = $this->search_clause_factory->getBasicClause(
192 $this->getCopyrightDescriptionPath(),
198 return $this->search_clause_factory->getJoinedClauses(
200 ...$copyright_search_clauses
208 return $manipulator->prepareCreateOrUpdate(
209 $this->getCopyrightDescriptionPath(),
216 return $reader->
firstData($this->getCopyrightDescriptionPath())->value();
221 return $this->path_factory->custom()
222 ->withNextStep(
'rights')
223 ->withNextStep(
'description')
224 ->withNextStep(
'string')
232 $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...