mirror of
https://github.com/Karaka-Management/oms-Tasks.git
synced 2026-02-15 14:18:41 +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';
|
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
|
* Count unread task
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user