First API implementation
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user