public function getPhotoUrl($type = null) { if (empty($this->file)) { return Zend_Registry::get('Zend_View')->getBaseUrl() . '/images/no_photo_thumb.jpg'; } return parent::getPhotoUrl(); }
public function getPhotoUrl($type = null) { if (empty($this->ten_file)) { return Khcn_View_Helper_GetBaseUrl::getBaseUrl() . '/images/nophoto_user.png'; } return parent::getPhotoUrl($type); }
/** * 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(); }
protected function _delete() { $ndcts = $this->getNDCTs(); foreach ($ndcts as $ndct) { $ndct->delete(); } parent::_delete(); }
/** * 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(); }
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; }
/** * 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(); }
protected function _postDelete() { parent::_postDelete(); $this->updateSlideshow(); }
/** * 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(); }