Add email notifications

This commit is contained in:
Frédéric Guillot
2014-08-15 17:23:41 -07:00
parent c539bdc8ab
commit 9eeded33f6
240 changed files with 23410 additions and 308 deletions

View File

@@ -24,6 +24,13 @@ class File extends Base
*/
const BASE_PATH = 'data/files/';
/**
* Events
*
* @var string
*/
const EVENT_CREATE = 'file.create';
/**
* Get a file by the id
*
@@ -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,