Exemple #1
0
 static function checkUserContent($params)
 {
     $db = JFactory::getDbo();
     $query = modBusinessContentHelper::getQuery($params, true, true);
     $db->setQuery($query);
     $obj = $db->loadObject();
     if ($db->getErrorMsg()) {
         die($db->getErrorMsg());
     }
     if (!empty($obj->count_id)) {
         return true;
     }
     return false;
 }
Exemple #2
0
 static function getList(&$params)
 {
     $limit = $params->get('limit', 5);
     $db = JFactory::getDbo();
     $query = modBusinessContentHelper::getQuery();
     $db->setQuery($query, 0, LIMIT_HOMEPAGE_SERVICES);
     $rows = $db->loadObjectList('id');
     foreach ($rows as &$row) {
         $img = json_decode($row->image);
         $row->img = '';
         if (!empty($img[0])) {
             $row->img = $img[0];
         }
     }
     return $rows;
 }