Skip to content
Snippets Groups Projects
Commit 10c3d8b5 authored by Dorian Merz's avatar Dorian Merz
Browse files

refs #18130 [master] use correct labelling for titleUniform data line

parent c1716bae
No related merge requests found
...@@ -364,9 +364,8 @@ class RecordDataFormatterFactory ...@@ -364,9 +364,8 @@ class RecordDataFormatterFactory
'getTitleUniform', 'getTitleUniform',
'data-titleUniform.phtml', 'data-titleUniform.phtml',
[ [
'labelFunction' => function () { 'labelFunction' =>
return null; [$this,'titleUniformLabel']
}
] ]
); );
$spec->setLine( $spec->setLine(
...@@ -853,9 +852,8 @@ class RecordDataFormatterFactory ...@@ -853,9 +852,8 @@ class RecordDataFormatterFactory
'getTitleUniform', 'getTitleUniform',
'data-titleUniform.phtml', 'data-titleUniform.phtml',
[ [
'labelFunction' => function () { 'labelFunction' =>
return null; [$this,'titleUniformLabel']
}
] ]
); );
$spec->setLine( $spec->setLine(
...@@ -949,4 +947,18 @@ class RecordDataFormatterFactory ...@@ -949,4 +947,18 @@ class RecordDataFormatterFactory
$spec->setTemplateLine('Tags', true, 'data-tags.phtml'); $spec->setTemplateLine('Tags', true, 'data-tags.phtml');
return $spec->getArray(); return $spec->getArray();
} }
/**
* Labels titleUniform Data Line based on the record
* being catalogued following RDA, or not. cf. https://projekte.ub.uni-leipzig.de/issues/13830
* @param $data
* @param $driver
* @return string
*/
public function titleUniformLabel($data, $driver)
{
return $driver->tryMethod('isRDA')
? 'rda_original_title'
: 'non_rda_original_title';
}
} }
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