mirror of
https://github.com/Karaka-Management/oms-Tasks.git
synced 2026-01-29 23:38:40 +00:00
Add dummy getOpen list function
This commit is contained in:
parent
8788628b55
commit
1a991430f7
|
|
@ -128,6 +128,23 @@ class TaskMapper extends DataMapperAbstract
|
|||
*/
|
||||
protected static $primaryField = 'task_id';
|
||||
|
||||
/**
|
||||
* Get open tasks
|
||||
*
|
||||
* @param int $user User
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function getOpen(int $user) : array
|
||||
{
|
||||
$query = self::getQuery();
|
||||
$query->where(self::$table . '.task_created_by', '=', $user)
|
||||
->where(self::$table . '.task_status', '=', TaskStatus::OPEN);
|
||||
|
||||
return self::getAllByQuery($query);
|
||||
}
|
||||
|
||||
/**
|
||||
* Count unread task
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user