andrii-mz / doctrine-qb-filter
Doctrine query builder filter without repositories.
Installs: 108
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^7.1
- doctrine/orm: ^2.7
- symfony/config: ^4.1|^5.1
- symfony/dependency-injection: ^4.1|^5.1
- symfony/http-kernel: ^4.1|^5.1
- symfony/property-info: ^4.1|^5.1
This package is auto-updated.
Last update: 2024-11-06 00:57:47 UTC
README
Query Filter Bundle
Query Filter Bundle gives an ability to user array filters instead of building query builder every time.
For example, you have an entity:
class User {
/**
* @ORM\Id
* @ORM\Column(type="integer")
*/
public $id;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Task")
*/
public $task;
}
If you need to extract users with task you can write simple lines instead of building queryBuilder:
$filter = new FilterRequest();
$filter->filter['task']['is_not_null'] = true;
$result = $queryFilter->getResults(User::class, $filter);
$users = $result->items;