コード例 #1
0
ファイル: helper.php プロジェクト: Simarpreet05/joomla
 function getModule($modId = 0)
 {
     $query = new XiptQuery();
     $query->select('*');
     $query->from('#__modules');
     $query->where("`id` = {$modId}");
     $module = $query->dbLoadQuery("", "")->loadObject();
     return $module;
 }
コード例 #2
0
ファイル: xiptmodule.php プロジェクト: Simarpreet05/joomla
 function getAllModules($published = '')
 {
     $query = new XiptQuery();
     $query->select('*');
     $query->from('#__modules');
     $query->where("`published` = {$published}");
     $query->order('ordering');
     $modules = $query->dbLoadQuery("", "")->loadObjectList();
     return $modules;
 }
コード例 #3
0
ファイル: profiletypes.php プロジェクト: Simarpreet05/joomla
 function getGroups($id = '')
 {
     $query = new XiptQuery();
     $query->select(' `id`, `name` ')->from('#__community_groups');
     if (!empty($id)) {
         $query->where(" `id`  = {$id} ");
     }
     return $query->dbLoadQuery("", "")->loadObjectList();
     /* TODO : what if group list is empty */
 }
コード例 #4
0
ファイル: profilefields.php プロジェクト: Simarpreet05/joomla
 function getJomsocialProfileFields($filter = '', $join = 'AND')
 {
     $query = new XiptQuery();
     $query->select('*');
     $query->from('#__community_fields');
     //setting up the search condition is there is any
     if (!empty($filter)) {
         foreach ($filter as $column => $value) {
             $query->where(" `{$column}` = '{$value}' ", $join);
         }
     }
     $query->order('ordering');
     $fields = $query->dbLoadQuery("", "")->loadObjectList();
     return $fields;
 }
コード例 #5
0
ファイル: table.php プロジェクト: Simarpreet05/joomla
 function delete($oid, $glue = 'AND')
 {
     //if its a pk, then simple call parent
     if (is_array($oid) === false) {
         return parent::delete($oid);
     }
     // if an array/ means not a primiary key
     //Support multiple key-value pair in $oid
     //rather then deleting on behalf of key only
     if (empty($oid) || count($oid) <= 0) {
         return false;
     }
     $query = new XiptQuery();
     $query->delete()->from($this->getTableName());
     foreach ($oid as $key => $value) {
         $query->where(" `{$key}`  = '{$value}' ", $glue);
     }
     // XITODO : generate warning if record does not exists
     return $query->dbLoadQuery("", "")->query();
 }