Completed
Push — 3.1 ( 7e9d2a...4fdd2b )
by Piotr
13:37 queued 13:35
created

CRUDElement::isFormAware()   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
/**
4
 * (c) FSi sp. z o.o. <[email protected]>
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
declare(strict_types=1);
11
12
namespace FSi\Bundle\AdminBundle\spec\fixtures\Admin;
13
14
use FSi\Component\DataGrid\DataGridFactoryInterface;
15
use FSi\Component\DataSource\DataSourceFactoryInterface;
16
use Symfony\Component\Form\FormFactoryInterface;
17
18
class CRUDElement extends SimpleAdminElement
19
{
20
    private $dataGridFactory;
21
    private $dataSourceFactory;
22
    private $formFactory;
23
24
    public function setDataGridFactory(DataGridFactoryInterface $factory)
25
    {
26
        $this->dataGridFactory = $factory;
27
    }
28
29
    public function setDataSourceFactory(DataSourceFactoryInterface $factory)
30
    {
31
        $this->dataSourceFactory = $factory;
32
    }
33
34
    public function setFormFactory(FormFactoryInterface $factory)
35
    {
36
        $this->formFactory = $factory;
37
    }
38
39
    public function isFormAware()
40
    {
41
        return isset($this->formFactory);
42
    }
43
44
    public function isDataGridAware()
45
    {
46
        return isset($this->dataGridFactory);
47
    }
48
49
    public function isDataSourceAware()
50
    {
51
        return isset($this->dataSourceFactory);
52
    }
53
}
54