added tags for timesheets (#604)
This commit is contained in:
14
src/Repository/Query/TagQuery.php
Normal file
14
src/Repository/Query/TagQuery.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Repository\Query;
|
||||
|
||||
class TagQuery extends BaseQuery
|
||||
{
|
||||
}
|
||||
@@ -54,6 +54,10 @@ class TimesheetQuery extends ActivityQuery
|
||||
* @var DateRange
|
||||
*/
|
||||
protected $dateRange;
|
||||
/**
|
||||
* @var iterable
|
||||
*/
|
||||
protected $tags;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@@ -208,4 +212,31 @@ class TimesheetQuery extends ActivityQuery
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return iterable
|
||||
*/
|
||||
public function getTags()
|
||||
{
|
||||
return $this->tags;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param iterable $tags
|
||||
* @return $this
|
||||
*/
|
||||
public function setTags(iterable $tags)
|
||||
{
|
||||
$this->tags = $tags;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function hasTags()
|
||||
{
|
||||
return !empty($this->tags) && count($this->tags) > 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user