Completed
Push — master ( c196b0...59e7df )
by WEBEWEB
01:34
created

DataTablesEvent::getEntities()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the jquery-datatables-bundle package.
5
 *
6
 * (c) 2018 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Bundle\JQuery\DataTablesBundle\Event;
13
14
use WBW\Bundle\CoreBundle\Event\AbstractEvent;
15
16
/**
17
 * DataTables event.
18
 *
19
 * @author webeweb <https://github.com/webeweb/>
20
 * @package WBW\Bundle\JQuery\DataTablesBundle\Event
21
 */
22
class DataTablesEvent extends AbstractEvent {
23
24
    /**
25
     * Entities.
26
     *
27
     * @var array
28
     */
29
    private $entities;
30
31
    /**
32
     * Constructor.
33
     *
34
     * @param string $eventName The name.
35
     */
36
    public function __construct($eventName, array $entities) {
37
        parent::__construct($eventName);
38
        $this->setEntities($entities);
39
    }
40
41
    /**
42
     * Get the entities.
43
     *
44
     * @return array Returns the entities.
45
     */
46
    public function getEntities() {
47
        return $this->entities;
48
    }
49
50
    /**
51
     * Set the entities.
52
     *
53
     * @param array $entities The entities.
54
     * @return DataTablesEvent Returns this event.
55
     */
56
    protected function setEntities(array $entities) {
57
        $this->entities = $entities;
58
        return $this;
59
    }
60
61
}
62