Skip to content
Snippets Groups Projects
Commit c031d404 authored by Dorian Merz's avatar Dorian Merz Committed by Robert Lange
Browse files

refs #18268 [finc] use MultiLine specs for some data fields

parent 638e21e8
Branches
Tags instance/local/staging/20211104_113228
No related merge requests found
......@@ -43,6 +43,9 @@ use VuFind\View\Helper\Root\RecordDataFormatter;
*/
class RecordDataFormatterFactory
{
use MultiDataFieldsTrait;
/**
* Create the helper.
*
......@@ -267,15 +270,10 @@ class RecordDataFormatterFactory
'getLanguages',
'data-transEscCommaSepLang.phtml'
);
$spec->setTemplateLine(
$spec->setMultiLine(
'Additionals',
'getAdditionals',
'data-additionals.phtml',
[
'labelFunction' => function () {
return null;
}
]
[$this,'additionals']
);
return $spec->getArray();
}
......@@ -428,27 +426,20 @@ class RecordDataFormatterFactory
'getAllRecordLinks',
'data-allRecordLinks.phtml'
);
$spec->setTemplateLine(
$spec->setMultiLine(
'Additionals',
'getAdditionals',
'data-additionals.phtml',
[
'labelFunction' => function () {
return null;
}
]
[$this,'additionals']
);
$spec->setTemplateLine(
'Source',
'getMegaCollection',
'data-escapeHtml.phtml'
);
$spec->setTemplateLine(
null,
$spec->setMultiLine(
"Other Relationship Entry",
'getOtherRelationshipEntry',
'data-otherRelationshipEntry.phtml',
[
]
[$this,'otherRelationshipEntry']
);
$spec->setTemplateLine(
'Notes',
......@@ -750,15 +741,10 @@ class RecordDataFormatterFactory
'context' => ['class' => 'recordIdentifiers']
]
);
$spec->setTemplateLine(
$spec->setMultiLine(
'Events',
true,
'data-events.phtml',
[
'labelFunction' => function () {
return null;
}
]
'getEvents',
[$this,'events']
);
// , context: "recordEvents"
$spec->setTemplateLine(
......@@ -914,6 +900,11 @@ class RecordDataFormatterFactory
'data-childRecords.phtml',
['allowZero' => false]
);
$spec->setMultiLine(
'Additionals',
'getAdditionals',
[$this,'additionals']
);
/* finc: remove 'Online Access' in record-details #13770 - VE */
/* $spec->setTemplateLine('Online Access', true, 'data-onlineAccess.phtml'); */
$spec->setTemplateLine(
......@@ -936,15 +927,10 @@ class RecordDataFormatterFactory
'getMegaCollection',
'data-escapeHtml.phtml'
);
$spec->setTemplateLine(
'OtherRelationshipEntry',
$spec->setMultiLine(
"Other Relationship Entry",
'getOtherRelationshipEntry',
'data-otherRelationshipEntry.phtml',
[
'labelFunction' => function () {
return null;
}
]
[$this,'otherRelationshipEntry']
);
$spec->setTemplateLine(
'Notes',
......
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