mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 17:44:41 +00:00
(mvc) check if field exists in UImodel grid helper class
This commit is contained in:
parent
0bf7b4d382
commit
2f9b4d5cd8
@ -76,15 +76,17 @@ class UIModelGrid
|
||||
$row = array();
|
||||
$row['uuid'] = $record->getAttributes()['uuid'];
|
||||
foreach ($fields as $fieldname) {
|
||||
$row[$fieldname] = $record->$fieldname->getNodeData();
|
||||
if (is_array($row[$fieldname])) {
|
||||
foreach ($row[$fieldname] as $fieldKey => $fieldValue) {
|
||||
if ($fieldValue['selected'] == 1) {
|
||||
$row[$fieldname] = $fieldValue['value'];
|
||||
}
|
||||
}
|
||||
if ($record->$fieldname != null) {
|
||||
$row[$fieldname] = $record->$fieldname->getNodeData();
|
||||
if (is_array($row[$fieldname])) {
|
||||
$row[$fieldname] = "##Unlinked";
|
||||
foreach ($row[$fieldname] as $fieldKey => $fieldValue) {
|
||||
if ($fieldValue['selected'] == 1) {
|
||||
$row[$fieldname] = $fieldValue['value'];
|
||||
}
|
||||
}
|
||||
if (is_array($row[$fieldname])) {
|
||||
$row[$fieldname] = "##Unlinked";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user