当前位置: 首页>>代码示例>>PHP>>正文


PHP Core_Model_Item_Abstract::_postDelete方法代码示例

本文整理汇总了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();
     }
 }
开发者ID:hoalangoc,项目名称:ftf,代码行数:8,代码来源:Playlistassoc.php

示例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();
     }
 }
开发者ID:hoalangoc,项目名称:ftf,代码行数:9,代码来源:Tour.php

示例3: _postDelete

 protected function _postDelete() {
     parent::_postDelete();
     if (file_exists($this->photo_url)) {
         @unlink($this->photo_url);
     }
 }
开发者ID:hoalangoc,项目名称:ftf,代码行数:6,代码来源:Category.php

示例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();
 }
开发者ID:hoalangoc,项目名称:ftf,代码行数:14,代码来源:Album.php

示例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();
        }
    }
开发者ID:hoalangoc,项目名称:ftf,代码行数:11,代码来源:Playlist.php

示例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();
 }
开发者ID:hoalangoc,项目名称:ftf,代码行数:32,代码来源:Photo.php

示例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();
		//             }
		//         }
	}
开发者ID:hoalangoc,项目名称:ftf,代码行数:12,代码来源:Video.php


注:本文中的Core_Model_Item_Abstract::_postDelete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。