Пример #1
0
 public function title($html = FALSE)
 {
     $return = '';
     if ($html) {
         $return .= '<i class="fa fa-home"></i> ';
     }
     $return .= parent::title();
     return $return;
 }
Пример #2
0
 public function delete($object = '', $related_field = '')
 {
     // if something is given, then just pass it over, the caller must be knowing what he's doing
     if ($object) {
         return parent::delete($object, $related_field);
     } else {
         $has = array_merge(array_keys($this->has_one), array_keys($this->has_many));
         foreach ($has as $rfield) {
             $this->{$rfield}->get()->delete_all();
         }
         return parent::delete();
     }
 }
Пример #3
0
 public function get($id, $bizid = 0, $uid = 0)
 {
     if (!$bizid) {
         return parent::get($id);
     }
     $photo = array();
     $uid == 0 ? $biz_photos_stats = $this->get_biz_photo_stats($bizid) : ($biz_photos_stats = $this->get_user_photo_stats($uid, $bizid));
     $biz_photos = $biz_photos_stats['photos'];
     if (isset($biz_photos[$id])) {
         $photo = $biz_photos[$id];
     }
     return $photo;
 }
Пример #4
0
 /**
  * 会员分页构造函数
  *
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
 }
Пример #5
0
 public function __get($name)
 {
     switch ($name) {
         case 'time_id':
             return $this->start . '-' . $this->end;
             break;
     }
     return parent::__get($name);
 }
Пример #6
0
 /**
  * 构造函数
  *
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->_tablename = 'sys_menu';
     $this->_rolename = 'sys_role_priv';
 }
Пример #7
0
 public function __construct()
 {
     parent::__construct();
     $this->set('table', 'messages');
 }
Пример #8
0
 function __construct()
 {
     parent::__construct();
     $this->load->library('mongo_db');
 }