Skip to content
Snippets Groups Projects
Commit 8e9c987b authored by Jean-Pascal Kanter's avatar Jean-Pascal Kanter :speech_balloon: Committed by Robert Lange
Browse files

refs #25982 [fid_bbi] release/fid_bbi/2024_06 extended getTitle() of record...

refs #25982 [fid_bbi] release/fid_bbi/2024_06 extended getTitle() of record driver to filter markings of the ancients in frontend, namely: ['˜','œ']
......@@ -85,10 +85,11 @@ trait SolrMarcFincTrait
}
}
return array_merge(
$title = array_merge(
[$title],
$this->getLinkedFieldArray('245', ['a', 'b', 'c'])
);
return str_replace(['˜','œ'], '', $title);
}
public function isSeriesVolume()
......@@ -225,4 +226,29 @@ trait SolrMarcFincTrait
}
return null;
}
/**
* Get the full title of the record. Replaces two characters
*
* Refs #25982 remove ancient exclusion markers
*
* @return string
*/
public function getTitle()
{
return str_replace(['˜','œ'], '', parent::getTitle());
}
/**
* Get publication details stored in the Solr field imprint_str_mv as an array of strings
* Or if empty use value of Solr field 'imprint' from method 'getImprint' as string
*
* Refs #25982 remove ancient exclusion markers
*
* @return string|array
*/
public function getImprint()
{
return str_replace(['˜','œ'], '', parent::getImprint());
}
}
......@@ -86,11 +86,13 @@ class Record extends \finc\View\Helper\Root\Record
if (!empty($highlightedTitle)) {
$highlight = $this->getView()->plugin('highlight');
$addEllipsis = $this->getView()->plugin('addEllipsis');
$highlightedTitle = str_replace(['˜','œ'], '', $highlightedTitle); // refs #25982
return $highlight($addEllipsis($highlightedTitle, $title));
}
if (!empty($title)) {
$escapeHtml = $this->getView()->plugin('escapeHtml');
$truncate = $this->getView()->plugin('truncate');
$title = str_replace(['˜','œ'], '', $title); // refs #25982
return $escapeHtml($truncate($title, $maxLength));
}
$transEsc = $this->getView()->plugin('transEsc');
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment