Skip to content
Snippets Groups Projects
Commit 283cca3f authored by Demian Katz's avatar Demian Katz
Browse files

Pass driver object to label function.

- Progress on VUFIND-1267.
parent c5aa5f29
No related merge requests found
...@@ -102,7 +102,8 @@ class RecordDataFormatter extends AbstractHelper ...@@ -102,7 +102,8 @@ class RecordDataFormatter extends AbstractHelper
} }
// Allow dynamic label override: // Allow dynamic label override:
$label = is_callable($current['labelFunction'] ?? null) $label = is_callable($current['labelFunction'] ?? null)
? call_user_func($current['labelFunction'], $data) : $field; ? call_user_func($current['labelFunction'], $data, $driver)
: $field;
$result[$label] = [ $result[$label] = [
'value' => $text, 'value' => $text,
'context' => $current['context'] ?? [], 'context' => $current['context'] ?? [],
......
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