diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-06-20 21:59:59 -0300 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-06-20 21:59:59 -0300 |
commit | b513313c2fbfb0e5f15cab97ea74929b5c0d0a60 (patch) | |
tree | f96d6022f88fc22fc82f85e68a57eddafb423d39 /app/Model/Project.php | |
parent | 08621f99e6333c5e218724d173654bf225586d59 (diff) |
Add a board selector instead of the list of projects
Diffstat (limited to 'app/Model/Project.php')
-rw-r--r-- | app/Model/Project.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/app/Model/Project.php b/app/Model/Project.php index b5716a81..51a23967 100644 --- a/app/Model/Project.php +++ b/app/Model/Project.php @@ -319,7 +319,7 @@ class Project extends Base * Get a list of project by status * * @access public - * @param integer $status Proejct status: self::ACTIVE or self:INACTIVE + * @param integer $status Project status: self::ACTIVE or self:INACTIVE * @return array */ public function getListByStatus($status) @@ -347,7 +347,7 @@ class Project extends Base } /** - * Return a list of projects for a given user + * Filter a list of projects for a given user * * @access public * @param array $projects Project list: ['project_id' => 'project_name'] @@ -366,6 +366,18 @@ class Project extends Base } /** + * Return a list of projects for a given user + * + * @access public + * @param integer $user_id User id + * @return array + */ + public function getAvailableList($user_id) + { + return $this->filterListByAccess($this->getListByStatus(self::ACTIVE), $user_id); + } + + /** * Create a project * * @access public |