summaryrefslogtreecommitdiff
path: root/app/Model/TaskFileModel.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-07-17 18:47:06 -0400
committerFrederic Guillot <fred@kanboard.net>2016-07-17 18:47:06 -0400
commitcbe52e57200a66522d88dfc5d5f46de8eb87ffb2 (patch)
tree5a8b37d64c0ce4142d19c50a716f1ffb9c47ee7d /app/Model/TaskFileModel.php
parentec0ecc5b0387924f061865f4ec12dbfc5b7018fe (diff)
File events refactoring
Diffstat (limited to 'app/Model/TaskFileModel.php')
-rw-r--r--app/Model/TaskFileModel.php23
1 files changed, 11 insertions, 12 deletions
diff --git a/app/Model/TaskFileModel.php b/app/Model/TaskFileModel.php
index 7603019a..0163da28 100644
--- a/app/Model/TaskFileModel.php
+++ b/app/Model/TaskFileModel.php
@@ -61,18 +61,6 @@ class TaskFileModel extends FileModel
}
/**
- * Get event name
- *
- * @abstract
- * @access protected
- * @return string
- */
- protected function getEventName()
- {
- return self::EVENT_CREATE;
- }
-
- /**
* Get projectId from fileId
*
* @access public
@@ -101,4 +89,15 @@ class TaskFileModel extends FileModel
$original_filename = e('Screenshot taken %s', $this->helper->dt->datetime(time())).'.png';
return $this->uploadContent($task_id, $original_filename, $blob);
}
+
+ /**
+ * Fire file creation event
+ *
+ * @access protected
+ * @param integer $file_id
+ */
+ protected function fireCreationEvent($file_id)
+ {
+ $this->queueManager->push($this->taskFileEventJob->withParams($file_id, self::EVENT_CREATE));
+ }
}