fetch toolbar results without page reload (#518)

This commit is contained in:
Kevin Papst
2019-01-23 02:45:33 +01:00
committed by GitHub
parent a9ece209ae
commit 89abaa9dda
21 changed files with 344 additions and 117 deletions

View File

@@ -85,11 +85,11 @@ class ProjectRepository extends AbstractRepository
/**
* Returns a query builder that is used for ProjectType and your own 'query_builder' option.
*
* @param Project|null $entity
* @param Customer|null $customer
* @param Project|int|null $entity
* @param Customer|int|null $customer
* @return array|QueryBuilder|Pagerfanta
*/
public function builderForEntityType(Project $entity = null, Customer $customer = null)
public function builderForEntityType($entity = null, $customer = null)
{
$query = new ProjectQuery();
$query->setHiddenEntity($entity);
@@ -121,7 +121,6 @@ class ProjectRepository extends AbstractRepository
}
$qb->andWhere('p.visible = 1');
/** @var Project $entity */
$entity = $query->getHiddenEntity();
if (null !== $entity) {
$qb->orWhere('p.id = :project')->setParameter('project', $entity);