Example #1
0
 /**
  * Cleanup AlbumImage
  */
 public function beforeDelete()
 {
     $cover = $this->cover;
     if ($cover != null) {
         $cover->delete();
     }
     foreach ($this->getImages() as $image) {
         $image->delete();
     }
     /**
      * Remove notifications.
      */
     Notification::remove('Album', $this->id);
     return parent::beforeDelete();
 }
Example #2
0
 /**
  * Before Delete, remove LikeCount (Cache) of target object.
  * Remove activity
  */
 protected function beforeDelete()
 {
     Notification::remove('Post', $this->id);
     return parent::beforeDelete();
 }
Example #3
0
 public function beforeDelete()
 {
     foreach ($this->revisions as $revision) {
         $revision->delete();
     }
     return parent::beforeDelete();
 }