Completed
Push — 3.x ( fafa70...5d69f2 )
by Vincent
03:36 queued 41s
created

Datagrid::getQuery()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Sonata Project package.
7
 *
8
 * (c) Thomas Rabaix <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Sonata\AdminBundle\Tests\App\Datagrid;
15
16
use Sonata\AdminBundle\Admin\FieldDescriptionInterface;
17
use Sonata\AdminBundle\Datagrid\DatagridInterface;
18
use Sonata\AdminBundle\Datagrid\PagerInterface;
19
use Sonata\AdminBundle\Filter\FilterInterface;
20
use Symfony\Component\Form\Extension\Core\Type\FormType;
21
use Symfony\Component\Form\FormFactoryInterface;
22
23
final class Datagrid implements DatagridInterface
24
{
25
    /**
26
     * @var FormFactoryInterface
27
     */
28
    private $formFactory;
29
30
    /**
31
     * @var PagerInterface
32
     */
33
    private $pager;
34
35
    public function __construct(FormFactoryInterface $formFactory, PagerInterface $pager)
36
    {
37
        $this->formFactory = $formFactory;
38
        $this->pager = $pager;
39
    }
40
41
    public function getPager()
42
    {
43
        return $this->pager;
44
    }
45
46
    public function getQuery()
47
    {
48
        throw new \BadMethodCallException('Not implemented.');
49
    }
50
51
    public function getResults()
52
    {
53
        return $this->pager->getResults();
54
    }
55
56
    public function buildPager()
57
    {
58
    }
59
60
    public function addFilter(FilterInterface $filter)
61
    {
62
    }
63
64
    public function getFilters()
65
    {
66
        return [];
67
    }
68
69
    public function reorderFilters(array $keys)
70
    {
71
    }
72
73
    public function getValues()
74
    {
75
        return [];
76
    }
77
78
    public function getColumns()
79
    {
80
        throw new \BadMethodCallException('Not implemented.');
81
    }
82
83
    public function setValue($name, $operator, $value)
84
    {
85
    }
86
87
    public function getForm()
88
    {
89
        return $this->formFactory->createNamedBuilder('filter', FormType::class, [])->getForm();
90
    }
91
92
    public function getFilter($name)
93
    {
94
        throw new \BadMethodCallException('Not implemented.');
95
    }
96
97
    public function hasFilter($name)
98
    {
99
        return false;
100
    }
101
102
    public function removeFilter($name)
103
    {
104
    }
105
106
    public function hasActiveFilters()
107
    {
108
        return false;
109
    }
110
111
    public function hasDisplayableFilters()
112
    {
113
        return false;
114
    }
115
116
    public function getSortParameters(FieldDescriptionInterface $fieldDescription): array
0 ignored issues
show
Unused Code introduced by
The parameter $fieldDescription is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
117
    {
118
        return [];
119
    }
120
121
    public function getPaginationParameters(int $page): array
0 ignored issues
show
Unused Code introduced by
The parameter $page is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
122
    {
123
        return [];
124
    }
125
}
126