コード例 #1
0
ファイル: DanhSachLop.php プロジェクト: nhochong/qlkh-sgu
 public function getPhotoUrl($type = null)
 {
     if (empty($this->file)) {
         return Zend_Registry::get('Zend_View')->getBaseUrl() . '/images/no_photo_thumb.jpg';
     }
     return parent::getPhotoUrl();
 }
コード例 #2
0
ファイル: NhanSu.php プロジェクト: nhochong/qlkh-sgu
 public function getPhotoUrl($type = null)
 {
     if (empty($this->ten_file)) {
         return Khcn_View_Helper_GetBaseUrl::getBaseUrl() . '/images/nophoto_user.png';
     }
     return parent::getPhotoUrl($type);
 }
コード例 #3
0
 /**
  * Pre-delete hook. If overridden, should be called at end of function.
  *
  * @return void
  */
 protected function _delete()
 {
     $hinhAnhs = Khcn_Api::_()->getDbTable('hinh_anh_chuyen_de', 'default')->getHinhAnhByChuyenDe($this->getIdentity());
     foreach ($hinhAnhs as $hinh_anh) {
         $hinh_anh->delete();
     }
     parent::_delete();
 }
コード例 #4
0
ファイル: LichCongTac.php プロジェクト: nhochong/qlkh-sgu
 protected function _delete()
 {
     $ndcts = $this->getNDCTs();
     foreach ($ndcts as $ndct) {
         $ndct->delete();
     }
     parent::_delete();
 }
コード例 #5
0
ファイル: BaiBao.php プロジェクト: nhochong/qlkh-sgu
 /**
  * Pre-delete hook. If overridden, should be called at end of function.
  *
  * @return void
  */
 protected function _delete()
 {
     $tacGias = Khcn_Api::_()->getDbTable('tac_gia', 'default')->getTacGias($this->getIdentity());
     foreach ($tacGias as $tac_gia) {
         $tac_gia->delete();
     }
     parent::_delete();
 }
コード例 #6
0
ファイル: Search.php プロジェクト: nhochong/qlkh-sgu
 public function unindex(Khcn_Model_Item_Abstract $item)
 {
     $table = Khcn_Api::_()->getDbtable('search', 'default');
     $table->delete(array('type = ?' => $item->getType(), 'id = ?' => $item->getIdentity()));
     return $this;
 }
コード例 #7
0
ファイル: Abstract.php プロジェクト: nhochong/sdcd
 /**
  * Checks if the passed item has the same guid as the object
  * 
  * @param Core_Model_Item_Abstract $item
  * @return bool
  */
 public function isSelf(Khcn_Model_Item_Abstract $item)
 {
     return $item->getGuid() === $this->getGuid();
 }
コード例 #8
0
ファイル: HinhAnh.php プロジェクト: nhochong/qlkh-sgu
 protected function _postDelete()
 {
     parent::_postDelete();
     $this->updateSlideshow();
 }
コード例 #9
0
ファイル: NguoiDung.php プロジェクト: nhochong/qlkh-sgu
 /**
  * Pre-update hook. If overridden, should be called at end of function.
  *
  * @return void
  */
 protected function _update()
 {
     if (!empty($this->ma_giang_vien) && ($giang_vien = Khcn_Api::_()->getItem('default_giang_vien', $this->ma_giang_vien))) {
         $giang_vien->ho = $this->ho;
         $giang_vien->ten = $this->ten;
         $giang_vien->save();
     }
     parent::_update();
 }