Ejemplo n.º 1
0
 public static function exclude_hidden(ORM $orm, $is_master_site)
 {
     if (!$is_master_site) {
         $hided_list = ORM::factory('hided_List')->where('object_name', '=', $orm->object_name())->find_all()->as_array(NULL, 'element_id');
         if (!empty($hided_list)) {
             $orm->where($orm->primary_key(), 'NOT IN', $hided_list);
         }
     }
 }
Ejemplo n.º 2
0
 /**
  * Read operation
  *
  * @param  int $id
  * @return ORM
  */
 public function read($id)
 {
     return $this->orm->where($this->orm->object_name() . '.' . $this->orm->primary_key(), '=', $id)->find();
 }