Custom::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 4
crap 1
1
<?php
2
3
/**
4
 * This file is part of the Grido (https://github.com/o5/grido)
5
 *
6
 * Copyright (c) 2011 Petr Bugyík (http://petr.bugyik.cz)
7
 *
8
 * For the full copyright and license information, please view
9
 * the file LICENSE.md that was distributed with this source code.
10
 */
11
12
namespace Grido\Components\Filters;
13
14
/**
15
 * Filter with custom form control.
16
 *
17
 * @package     Grido
18
 * @subpackage  Components\Filters
19
 * @author      Petr Bugyík
20
 *
21
 * @property-read \Nette\Forms\IControl $formControl
22
 */
23
class Custom extends Filter
24 1
{
25
    /** @var \Nette\Forms\IControl */
26
    protected $formControl;
27
28
    /**
29
     * @param \Grido\Grid $grid
30
     * @param string $name
31
     * @param string $label
32
     * @param \Nette\Forms\IControl $formControl
33
     */
34
    public function __construct($grid, $name, $label, \Nette\Forms\IControl $formControl)
35
    {
36 1
        $this->formControl = $formControl;
37
38 1
        parent::__construct($grid, $name, $label);
39 1
    }
40
41
    /**
42
     * @return \Nette\Forms\IControl
43
     * @internal
44
     */
45
    public function getFormControl()
46
    {
47 1
        return $this->formControl;
48
    }
49
}
50