-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFilterInterface.php
More file actions
41 lines (35 loc) · 901 Bytes
/
FilterInterface.php
File metadata and controls
41 lines (35 loc) · 901 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
namespace Orkestra\Bundle\ReportBundle;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\HttpFoundation\Request,
Symfony\Component\Form\FormBuilder;
/**
* Defines the contract all Filters must follow
*/
interface FilterInterface
{
/**
* Apply the current state of the filter to the given QueryBuilder instance
*
* @param \Doctrine\ORM\QueryBuilder $qb
*
* @return void
*/
function apply(QueryBuilder $qb);
/**
* Binds the given request to the filter
*
* @param \Symfony\Component\HttpFoundation\Request $request
*
* @return void
*/
function bindRequest(Request $request);
/**
* Allows the filter to add form elements to the report's filter form
*
* @param \Symfony\Component\Form\FormBuilder $builder
*
* @return void
*/
function buildForm(FormBuilder $builder);
}