}
- // search company name and description
- if (!empty($q['_search'])) {
- $s = $this->escape($q['_search']);
- $this->whereAdd("Companies.name like '%$s%' OR Companies.description like '%$s%' ");
- }
-
// depricated - should be moved to module specific (texon afair)
if (!empty($q['query']['province'])) {
return $fm->toHTML($size, $base);
}
+ function toRooSingleArray($authUser, $request)
+ {
+ $ret = $this->toArray();
+ // DB_DataObject::debugLevel(1);
+ // get the comptype display
+ $e = DB_DataObject::Factory('core_enum');
+ $e->etype = 'COMPTYPE';
+ $e->name = $this->comptype;
+ $ret['comptype_display'] = $ret['comptype'];
+ if ($e->find(true) && !empty($e->name_display)) {
+ $ret['comptype_display'] = $e->name_display;
+ }
+
+
+ return $ret;
+ }
}