Write log entry on file removal

This commit is contained in:
Michael
2018-10-16 01:39:42 +01:00
committed by fguillot
parent 00228ac12f
commit cc81f9d4f5
7 changed files with 59 additions and 0 deletions

View File

@@ -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));
}
}