19 declare(strict_types=1);
62 $normalized_copyright = str_replace(
'https://',
'http://', $copyright);
64 $matches_by_name =
null;
66 $entry_link = (string) $entry->copyrightData()->link();
67 $normalized_link = str_replace(
'https://',
'http://', $entry_link);
68 if ($normalized_link !==
'' && str_contains($normalized_copyright, $normalized_link)) {
69 return $this->identifier_handler->buildIdentifierFromEntryID($entry->id());
73 is_null($matches_by_name) &&
74 trim($copyright) === trim($entry->copyrightData()->fullName())
76 $matches_by_name = $this->identifier_handler->buildIdentifierFromEntryID($entry->id());
80 if (!is_null($matches_by_name)) {
81 return $matches_by_name;
92 if (!$this->identifier_handler->isIdentifierValid($copyright) && $copyright !==
'') {
96 if ($copyright ===
'') {
97 $entry_data = $this->copyright_repository->getDefaultEntry()->copyrightData();
99 $entry_id = $this->identifier_handler->parseEntryIDFromIdentifier($copyright);
100 $entry_data = $this->copyright_repository->getEntry($entry_id)->copyrightData();
102 $full_name = $entry_data->fullName();
103 $link = $entry_data->link();
105 if (!is_null($link)) {
106 return (
string) $link;
116 if (!isset($this->copyright_entries)) {
117 $this->copyright_entries = iterator_to_array($this->copyright_repository->getAllEntries());
124 return $this->
settings->isCopyrightSelectionActive();
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null