fix: [analyst-data:view] Use correct model to access element property

notes
Sami Mokaddem 2024-01-30 09:12:49 +01:00
parent 1975e38d8c
commit 9de54fa208
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 5 additions and 5 deletions

View File

@ -16,15 +16,15 @@ echo $this->element(
[
'key' => __('Target Object'),
'type' => 'custom',
'function' => function (array $row) use ($baseurl) {
$path = Inflector::pluralize(strtolower($row['Note']['object_type']));
'function' => function (array $row) use ($baseurl, $modelSelection) {
$path = Inflector::pluralize(strtolower($row[$modelSelection]['object_type']));
return sprintf(
'<span class="bold">%s</span>: <a href="%s/%s/view/%s">%s</a>',
h($row['Note']['object_type']),
h($row[$modelSelection]['object_type']),
h($baseurl),
h($path),
h($row['Note']['object_uuid']),
h($row['Note']['object_uuid'])
h($row[$modelSelection]['object_uuid']),
h($row[$modelSelection]['object_uuid'])
);
}