本文整理汇总了PHP中Core_Model_Item_Abstract::_postDelete方法的典型用法代码示例。如果您正苦于以下问题:PHP Core_Model_Item_Abstract::_postDelete方法的具体用法?PHP Core_Model_Item_Abstract::_postDelete怎么用?PHP Core_Model_Item_Abstract::_postDelete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Core_Model_Item_Abstract
的用法示例。
在下文中一共展示了Core_Model_Item_Abstract::_postDelete方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _postDelete
protected function _postDelete() {
parent::_postDelete();
$playlist = Engine_Api::_()->getItem('ynvideo_playlist', $this->playlist_id);
if ($playlist) {
$playlist->video_count = new Zend_Db_Expr('video_count - 1');
$playlist->save();
}
}
示例2: _postDelete
protected function _postDelete()
{
parent::_postDelete();
$model = new Yntour_Model_DbTable_Touritems();
$select = $model->select()->where('tour_id=?', $this->getIdentity());
foreach ($model->fetchAll($select) as $row) {
$row->delete();
}
}
示例3: _postDelete
protected function _postDelete() {
parent::_postDelete();
if (file_exists($this->photo_url)) {
@unlink($this->photo_url);
}
}
示例4: _postDelete
protected function _postDelete()
{
$photoTable = Engine_Api::_()->getItemTable('album_photo');
$photoSelect = $photoTable->select()->where('album_id = ?', $this->getIdentity());
foreach ($photoTable->fetchAll($photoSelect) as $photo) {
$photo->skipAlbumDeleteHook = true;
try {
$photo->delete();
} catch (Exception $e) {
// Silence
}
}
parent::_postDelete();
}
示例5: _postDelete
protected function _postDelete() {
parent::_postDelete();
// Remove all association videos to this playlist
$table = Engine_Api::_()->getDbtable('playlistassoc', 'ynvideo');
$select = $table->select()->where('playlist_id = ?', $this->getIdentity());
foreach ($table->fetchAll($select) as $playlistAssoc) {
$playlistAssoc->delete();
}
}
示例6: _postDelete
protected function _postDelete()
{
$mainPhoto = Engine_Api::_()->getItemTable('storage_file')->getFile($this->file_id);
$thumbPhoto = Engine_Api::_()->getItemTable('storage_file')->getFile($this->file_id, 'thumb.normal');
// Delete thumb
if ($thumbPhoto && $thumbPhoto->getIdentity()) {
try {
$thumbPhoto->delete();
} catch (Exception $e) {
}
}
// Delete main
if ($mainPhoto && $mainPhoto->getIdentity()) {
try {
$mainPhoto->delete();
} catch (Exception $e) {
}
}
// Change album cover if applicable
try {
if (!empty($this->album_id) && !$this->skipAlbumDeleteHook) {
$album = $this->getAlbum();
$nextPhoto = $this->getNextPhoto();
if ($album instanceof Album_Model_Album && $nextPhoto instanceof Album_Model_Photo && (int) $album->photo_id == (int) $this->getIdentity()) {
$album->photo_id = $nextPhoto->getIdentity();
$album->save();
}
}
} catch (Exception $e) {
}
parent::_postDelete();
}
示例7: _postDelete
protected function _postDelete()
{
parent::_postDelete();
// $signatureItem = Engine_Api::_()->getItem('ynvideo_signature', $this->owner_id);
// if ($signatureItem) {
// if ($signatureItem->video_count > 0) {
// $signatureItem->video_count = new Zend_Db_Expr('video_count - 1');
// $signatureItem->save();
// }
// }
}