Files
kimai/src/Repository/Query/UserQuery.php
Kevin Papst b2d3272151 support multiple teamleads in each team (#2702)
* fix jumping avatars
* fix line-break after color dot for long names
2021-08-07 18:05:41 +02:00

64 lines
1.2 KiB
PHP

<?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;
use App\Entity\Team;
/**
* Can be used for advanced queries with the: UserRepository
*/
class UserQuery extends BaseQuery implements VisibilityInterface
{
use VisibilityTrait;
public const USER_ORDER_ALLOWED = ['id', 'alias', 'username', 'title', 'email'];
/**
* @var string|null
*/
private $role;
private $searchTeams = [];
public function __construct()
{
$this->setDefaults([
'orderBy' => 'username',
]);
}
/**
* @return Team[]
*/
public function getSearchTeams(): array
{
return $this->searchTeams;
}
/**
* @param Team[] $searchTeams
*/
public function setSearchTeams(array $searchTeams): void
{
$this->searchTeams = $searchTeams;
}
public function getRole(): ?string
{
return $this->role;
}
public function setRole(?string $role): UserQuery
{
$this->role = $role;
return $this;
}
}