From cc81f9d4f5a9857e024829613ad670bc51056be5 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 16 Oct 2018 01:39:42 +0100 Subject: Write log entry on file removal --- app/Model/TaskFileModel.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'app/Model/TaskFileModel.php') diff --git a/app/Model/TaskFileModel.php b/app/Model/TaskFileModel.php index 0163da28..9d446004 100644 --- a/app/Model/TaskFileModel.php +++ b/app/Model/TaskFileModel.php @@ -23,6 +23,7 @@ class TaskFileModel extends FileModel * @var string */ const EVENT_CREATE = 'task.file.create'; + const EVENT_DESTROY = 'task.file.destroy'; /** * Get the table @@ -100,4 +101,15 @@ class TaskFileModel extends FileModel { $this->queueManager->push($this->taskFileEventJob->withParams($file_id, self::EVENT_CREATE)); } + + /** + * Fire file destruction event + * + * @access protected + * @param integer $file_id + */ + protected function fireDestructionEvent($file_id) + { + $this->queueManager->push($this->taskFileEventJob->withParams($file_id, self::EVENT_DESTROY)); + } } -- cgit v1.2.3