Commit 2f9b4d5c authored by Jos Schellevis's avatar Jos Schellevis

(mvc) check if field exists in UImodel grid helper class

parent 0bf7b4d3
......@@ -76,6 +76,7 @@ class UIModelGrid
$row = array();
$row['uuid'] = $record->getAttributes()['uuid'];
foreach ($fields as $fieldname) {
if ($record->$fieldname != null) {
$row[$fieldname] = $record->$fieldname->getNodeData();
if (is_array($row[$fieldname])) {
foreach ($row[$fieldname] as $fieldKey => $fieldValue) {
......@@ -88,6 +89,7 @@ class UIModelGrid
}
}
}
}
// if a search phrase is provided, use it to search in all requested fields
if ($searchPhrase != '') {
......
Markdown is supported
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