toolbar dropdown and visibility improvements (#933)

This commit is contained in:
Kevin Papst
2019-07-09 16:34:11 +02:00
committed by GitHub
parent b833e1ce27
commit c33a87a07c
74 changed files with 1317 additions and 631 deletions

View File

@@ -14,35 +14,17 @@ use App\Entity\Customer;
/**
* Can be used for advanced queries with the: ProjectRepository
*/
class ProjectQuery extends VisibilityQuery
class ProjectQuery extends CustomerQuery
{
/**
* @var Customer|int|null
*/
protected $customer;
private $customer;
/**
* @var array
*/
protected $ignored = [];
/**
* @param mixed $entity
* @return $this
*/
public function addIgnoredEntity($entity)
public function __construct()
{
$this->ignored[] = $entity;
return $this;
}
/**
* @return array
*/
public function getIgnoredEntities()
{
return $this->ignored;
parent::__construct();
$this->setOrderBy('name');
}
/**
@@ -63,4 +45,20 @@ class ProjectQuery extends VisibilityQuery
return $this;
}
/**
* {@inheritdoc}
*/
public function isDirty(): bool
{
if (parent::isDirty()) {
return true;
}
if ($this->customer !== null) {
return true;
}
return false;
}
}