GridExtension::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Psi\Component\Grid\Form;
6
7
use Psi\Component\Grid\ColumnRegistry;
8
use Psi\Component\Grid\FilterRegistry;
9
use Symfony\Component\Form\AbstractExtension;
10
11
class GridExtension extends AbstractExtension
12
{
13
    private $cellRegistry;
14
    private $filterRegistry;
15
16
    public function __construct(ColumnRegistry $cellRegistry, FilterRegistry $filterRegistry)
17
    {
18
        $this->cellRegistry = $cellRegistry;
19
        $this->filterRegistry = $filterRegistry;
20
    }
21
22
    public function loadTypes()
23
    {
24
        return [
25
            new Type\FilterType($this->filterRegistry),
26
        ];
27
    }
28
}
29