ListEvent::getDataSource()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 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\Event;
13
14
use FSi\Bundle\AdminBundle\Admin\Element;
15
use FSi\Component\DataGrid\DataGridInterface;
16
use FSi\Component\DataSource\DataSourceInterface;
17
use Symfony\Component\HttpFoundation\Request;
18
19
class ListEvent extends AdminEvent
20
{
21
    /**
22
     * @var DataSourceInterface
23
     */
24
    protected $dataSource;
25
26
    /**
27
     * @var DataGridInterface
28
     */
29
    protected $dataGrid;
30
31
    public function __construct(
32
        Element $element,
33
        Request $request,
34
        DataSourceInterface $dataSource,
35
        DataGridInterface $dataGrid
36
    ) {
37
        parent::__construct($element, $request);
38
39
        $this->dataSource = $dataSource;
40
        $this->dataGrid = $dataGrid;
41
    }
42
43
    public function getDataSource(): DataSourceInterface
44
    {
45
        return $this->dataSource;
46
    }
47
48
    public function getDataGrid(): DataGridInterface
49
    {
50
        return $this->dataGrid;
51
    }
52
}
53