From 84b0f0df90442775b9122457648f06c9485df1f1 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 17 Jan 2015 17:11:51 -0500 Subject: Add project calendars (merge/refactoring of #490) --- app/Model/TaskStatus.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'app/Model/TaskStatus.php') diff --git a/app/Model/TaskStatus.php b/app/Model/TaskStatus.php index 225b3933..30a65e1e 100644 --- a/app/Model/TaskStatus.php +++ b/app/Model/TaskStatus.php @@ -12,6 +12,23 @@ use Event\TaskEvent; */ class TaskStatus extends Base { + /** + * Return the list of statuses + * + * @access public + * @param boolean $prepend Prepend default value + * @return array + */ + public function getList($prepend = false) + { + $listing = $prepend ? array(-1 => t('All status')) : array(); + + return $listing + array( + Task::STATUS_OPEN => t('Open'), + Task::STATUS_CLOSED => t('Closed'), + ); + } + /** * Return true if the task is closed * -- cgit v1.2.3