Skip to content

Commit

Permalink
[KAT-3257] Added new argument 'ignoreindicators' for ParseMarcFieldVi…
Browse files Browse the repository at this point in the history
…ewHelper
  • Loading branch information
jnauber authored and chrode committed Jan 12, 2024
1 parent 3fd73a9 commit 5e42b87
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Classes/ViewHelpers/Data/ParseMarcFieldViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public function initializeArguments()
$this->registerArgument('subfieldasarray', 'boolean', 'Return subfields as array?', false, false);
$this->registerArgument('orderedarray', 'boolean', 'Return subfields as array ordered as in original data?', false, false);
$this->registerArgument('getindicators', 'boolean', 'Return indicator1 and indicator2 as fields', false, false);
$this->registerArgument('ignoreindicators', 'boolean', 'Ingnore indicator level in array ', false, false);
}

/**
Expand All @@ -38,7 +39,7 @@ public static function renderStatic(
foreach ($arguments['field'] as $field) {
$fieldData = explode('', $field);

if (strlen(trim($fieldData[0])) > 0) {
if ($arguments['ignoreindicators'] !== true && strlen(trim($fieldData[0])) > 0) {
$index = intval(substr($fieldData[0], 0, 1));

if (!is_array($output[$index])) {
Expand Down

0 comments on commit 5e42b87

Please sign in to comment.