Ejemplo n.º 1
0
 public function getById($image_id, $asobject = true)
 {
     $this->table_link = $this->db2->prefix('imagebody');
     $this->className = 'ImagesImage_Body';
     $criteria = new CriteriaCompo();
     $criteria->add(new Criteria('o.image_id', $image_id));
     return parent::getByLink($criteria, null, $asobject, 'image_id', 'image_id');
 }
Ejemplo n.º 2
0
 public function getLinks($related_id, $sort = 'link_weight', $order = 'desc')
 {
     $this->table_link = $this->db->prefix('page_content');
     $this->field_link = 'content_id';
     $this->field_object = 'link_content_id';
     $criteria = new CriteriaCompo();
     $criteria->add(new Criteria('link_related_id', $related_id));
     $criteria->setSort($sort);
     $criteria->setOrder($order);
     return parent::getByLink($criteria, null, false);
 }
Ejemplo n.º 3
0
 /**
  * @param CriteriaElement|null $criteria
  * @param bool $id_as_key
  *
  * @return array
  */
 public function getPermittedObjects($criteria = null, $start = 0, $limit = 0, $id_as_key = false, $asobject = true)
 {
     $this->table_link = $this->db2->prefix('system_permission');
     if (isset($criteria)) {
         $criteria = new CriteriaCompo($criteria);
     } else {
         $criteria = new CriteriaCompo();
     }
     $criteria->setSort('o.imgcat_weight, o.imgcat_id');
     $criteria->setOrder('ASC');
     $criteria->setStart($start);
     $criteria->setLimit($limit);
     return parent::getByLink($criteria, null, $asobject, 'gperm_itemid', 'imgcat_id');
 }