diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-05-28 19:48:22 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-05-28 19:48:22 -0400 |
commit | 14713b0ec7ed93ca45578da069ad4e19a7d8addf (patch) | |
tree | 79972d53f6091a1ddb17f64a6a05a5523f5d5168 /app/Model/ProjectNotification.php | |
parent | 936376ffe74c583d3cb819e98f53a85137fdf8bc (diff) |
Rename all models
Diffstat (limited to 'app/Model/ProjectNotification.php')
-rw-r--r-- | app/Model/ProjectNotification.php | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/app/Model/ProjectNotification.php b/app/Model/ProjectNotification.php deleted file mode 100644 index 5df042ca..00000000 --- a/app/Model/ProjectNotification.php +++ /dev/null @@ -1,67 +0,0 @@ -<?php - -namespace Kanboard\Model; - -use Kanboard\Core\Base; - -/** - * Project Notification - * - * @package model - * @author Frederic Guillot - */ -class ProjectNotification extends Base -{ - /** - * Send notifications - * - * @access public - * @param integer $project_id - * @param string $event_name - * @param array $event_data - */ - public function sendNotifications($project_id, $event_name, array $event_data) - { - $project = $this->project->getById($project_id); - - $types = array_merge( - $this->projectNotificationType->getHiddenTypes(), - $this->projectNotificationType->getSelectedTypes($project_id) - ); - - foreach ($types as $type) { - $this->projectNotificationType->getType($type)->notifyProject($project, $event_name, $event_data); - } - } - - /** - * Save settings for the given project - * - * @access public - * @param integer $project_id - * @param array $values - */ - public function saveSettings($project_id, array $values) - { - $this->db->startTransaction(); - - $types = empty($values['notification_types']) ? array() : array_keys($values['notification_types']); - $this->projectNotificationType->saveSelectedTypes($project_id, $types); - - $this->db->closeTransaction(); - } - - /** - * Read user settings to display the form - * - * @access public - * @param integer $project_id - * @return array - */ - public function readSettings($project_id) - { - return array( - 'notification_types' => $this->projectNotificationType->getSelectedTypes($project_id), - ); - } -} |