示例#1
0
 public function delete()
 {
     $this->handle_before_destroy();
     $result = parent::delete();
     $this->update_later_balance();
     return $result;
 }
 /**
  * Deletes a blog post and all
  * the associated comments.
  *
  * @return bool
  */
 public function delete()
 {
     // Delete the comments
     $this->comments()->delete();
     // Delete the blog post
     return parent::delete();
 }
示例#3
0
 public function delete()
 {
     $this->tabs()->delete();
     $this->fields()->delete();
     $this->requests()->delete();
     return parent::delete();
 }
示例#4
0
 public function delete()
 {
     // delete all related blocks
     $this->blocks()->delete();
     // delete the grid
     return parent::delete();
 }
示例#5
0
 public function delete()
 {
     foreach ($this->comments as $comment) {
         $comment->delete();
     }
     return parent::delete();
 }
示例#6
0
 public function delete()
 {
     if (File::exists($this->getPath())) {
         File::deleteDirectory($this->getPath());
     }
     parent::delete();
 }
 /**
  * Delete Category & related Albums
  *
  * @return bool
  */
 public function delete()
 {
     $albums = $this->albums;
     foreach ($albums as $album) {
         $album->delete();
     }
     return parent::delete();
 }
 /**
  * Delete Album & related Images
  *
  * @return bool
  */
 public function delete()
 {
     $images = $this->images;
     foreach ($images as $image) {
         $image->delete();
     }
     return parent::delete();
 }
示例#9
0
 public function delete()
 {
     $id = $this->id;
     if (!parent::delete()) {
         return false;
     }
     return !$this->find($id) ? true : false;
 }
 public function delete()
 {
     foreach ($this->todos as $todo) {
         $todo->delete();
     }
     $user->organizations()->detach();
     parent::delete();
 }
示例#11
0
 public function delete()
 {
     // Borra todos los comentarios
     foreach ($this->downloads as $download) {
         $download->delete();
     }
     // Borramos el Post
     return parent::delete();
 }
示例#12
0
 public function delete()
 {
     // Delete the details
     $this->seeker()->delete();
     // Delete the details
     $this->writer()->delete();
     // Delete the request
     return parent::delete();
 }
示例#13
0
 public function delete()
 {
     // Borra todos los comentarios
     foreach ($this->programmes as $programme) {
         $programme->delete();
     }
     // Borramos el Post
     return parent::delete();
 }
示例#14
0
 public function delete()
 {
     // Borra todos los comentarios
     foreach ($this->photos as $photo) {
         \File::delete($photo->image_url);
         $photo->delete();
     }
     // Borramos el Post
     return parent::delete();
 }
示例#15
0
 public function delete()
 {
     if ($this->id === $this->currentUser()->id) {
         return false;
     }
     $id = $this->id;
     Activity::log(array('contentID' => $this->id, 'contentType' => 'account_deleted', 'description' => $this->id, 'details' => '', 'updated' => $this->currentUser()->id ? true : false));
     Event::fire('controller.user.delete', array($this));
     if (!parent::delete()) {
         return false;
     }
     return !$this->find($id) ? true : false;
 }
示例#16
0
 public function delete()
 {
     $this->pledges()->delete();
     $this->comments()->delete();
     // 		if ($this->pledges)
     // 		{
     // 			foreach ($this->pledges as $pledge)
     // 			{
     // 				$pledge->delete();
     // 			}
     // 		}
     return parent::delete();
 }
示例#17
0
文件: Tag.php 项目: vanderlin/halp
 public function delete()
 {
     $this->spots()->sync([]);
     parent::delete();
 }
示例#18
0
 public function delete()
 {
     $client = static::getEsClient();
     $esParams = array('index' => static::getEsIndex(), 'type' => static::INDEX_TYPE, 'id' => $this->search_id);
     try {
         $client->delete($esParams);
     } catch (Exception $e) {
         $message = json_decode($e->getMessage());
         if ($message->ok) {
             Log::warning("The annotation with id: " . $this->search_id . " was not found in ElasticSearch.  Deleting annotation from the DB...");
         } else {
             throw new Exception("Unable to delete annotation from ElasticSearch: " . $e->getMessage());
         }
     }
     DB::transaction(function () {
         $deletedMetas = NoteMeta::where('annotation_id', '=', $this->id)->delete();
         $deletedComments = AnnotationComment::where('annotation_id', '=', $this->id)->delete();
         $deletedPermissions = AnnotationPermission::where('annotation_id', '=', $this->id)->delete();
         $deletedRanges = AnnotationRange::where('annotation_id', '=', $this->id)->delete();
         $deletedTags = AnnotationTag::where('annotation_id', '=', $this->id)->delete();
         return parent::delete();
     });
 }
示例#19
0
文件: Job.php 项目: Tjoosten/input
 /**
  * Delete the related source type
  */
 public function delete()
 {
     // Fill in the relationships in empl order
     $relations = array('extract' => $this->extractor()->first());
     // Don't fetch null relationships
     if (!empty($this->mapper_id)) {
         $relations['mapper'] = $this->mapper()->first();
     }
     $relations['loader'] = $this->loader()->first();
     // Don't fetch null relationships
     if (!empty($this->publisher_id)) {
         $relations['publisher'] = $this->publisher()->first();
     }
     // Delete the job's relationships
     foreach ($relations as $key => $relation) {
         $relation->delete();
     }
     parent::delete();
 }
 public function delete()
 {
     // delete old items
     EloquentTranslatedModel::items_delete(strtolower(get_called_class()), $this->id, $this->uid);
     return parent::delete();
 }
示例#21
0
 /**
  * on delete
  *
  * @return bool|null|void
  */
 public function delete()
 {
     // delete all orders
     $this->orders()->delete();
     return parent::delete();
 }
示例#22
0
 public function delete()
 {
     TodoItem::where('todo_list_id', $this->id)->delete();
     parent::delete();
 }
示例#23
0
 public function delete()
 {
     // Delete all the easyvisiteur that have the same id
     EVUser::where("user_id", $this->id)->delete();
     // Finally, delete this category...
     return parent::delete();
 }
示例#24
0
 /**
  * Deletes a blog post and all
  * the associated comments.
  *
  * @return bool
  */
 public function delete()
 {
     // Delete the blog post
     return parent::delete();
 }
示例#25
0
 public function delete()
 {
     parent::delete();
     return $this->handle_after_destroy();
 }
示例#26
0
 /**
  * Deletes a blog post and all
  * the associated comments.
  *
  * @return bool
  */
 public function delete()
 {
     $this->comments()->delete();
     return parent::delete();
 }
示例#27
0
文件: Definition.php 项目: tdt/core
 /**
  * Delete the related source type
  */
 public function delete()
 {
     $source_type = $this->source()->first();
     $source_type->delete();
     parent::delete();
 }
示例#28
0
 public function delete()
 {
     OdotListItem::where('odot_list_id', $this->id)->delete();
     parent::delete();
 }
 /**
  * Delete the model passed in
  * @param  Eloquent $model The description
  * @return void
  */
 public function delete($model)
 {
     $model->delete();
 }
示例#30
0
 public function delete()
 {
     return parent::delete();
 }