First API implementation

This commit is contained in:
Frédéric Guillot
2014-06-20 15:41:05 -03:00
parent efdc959c55
commit 7c5b900bd8
28 changed files with 1285 additions and 63 deletions

View File

@@ -61,6 +61,21 @@ class Category extends Base
return $prepend + $listing;
}
/**
* Return all categories for a given project
*
* @access public
* @param integer $project_id Project id
* @return array
*/
public function getAll($project_id)
{
return $this->db->table(self::TABLE)
->eq('project_id', $project_id)
->asc('name')
->findAll();
}
/**
* Create a category
*