summaryrefslogtreecommitdiff
path: root/app/Model/File.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model/File.php')
-rw-r--r--app/Model/File.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/Model/File.php b/app/Model/File.php
index 2a793217..d5a0c7cd 100644
--- a/app/Model/File.php
+++ b/app/Model/File.php
@@ -25,6 +25,13 @@ class File extends Base
const BASE_PATH = 'data/files/';
/**
+ * Events
+ *
+ * @var string
+ */
+ const EVENT_CREATE = 'file.create';
+
+ /**
* Get a file by the id
*
* @access public
@@ -82,6 +89,8 @@ class File extends Base
*/
public function create($task_id, $name, $path, $is_image)
{
+ $this->event->trigger(self::EVENT_CREATE, array('task_id' => $task_id, 'name' => $name));
+
return $this->db->table(self::TABLE)->save(array(
'task_id' => $task_id,
'name' => $name,