diff options
Diffstat (limited to 'app/Event/ProjectDailySummaryListener.php')
-rw-r--r-- | app/Event/ProjectDailySummaryListener.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/app/Event/ProjectDailySummaryListener.php b/app/Event/ProjectDailySummaryListener.php new file mode 100644 index 00000000..cd593abc --- /dev/null +++ b/app/Event/ProjectDailySummaryListener.php @@ -0,0 +1,28 @@ +<?php + +namespace Event; + +/** + * Project daily summary listener + * + * @package event + * @author Frederic Guillot + */ +class ProjectDailySummaryListener extends Base +{ + /** + * Execute the action + * + * @access public + * @param array $data Event data dictionary + * @return bool True if the action was executed or false when not executed + */ + public function execute(array $data) + { + if (isset($data['project_id'])) { + return $this->projectDailySummary->updateTotals($data['project_id'], date('Y-m-d')); + } + + return false; + } +} |