Completed
Push — master ( 89c3e8...c161b3 )
by Craig
05:56 queued 40s
created

ExtensionStateEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Zikula package.
7
 *
8
 * Copyright Zikula Foundation - https://ziku.la/
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Zikula\ExtensionsModule\Event;
15
16
use Symfony\Contracts\EventDispatcher\Event;
17
use Zikula\Bundle\CoreBundle\AbstractBundle;
18
19
/**
20
 * Class ExtensionStateEvent
21
 */
22
class ExtensionStateEvent extends Event
23
{
24
    /**
25
     * @var null|AbstractBundle The module instance. Null when Module object is not available
26
     */
27
    private $extension;
28
29
    /**
30
     * An array of info for the module. Possibly a result of calling $extensionEntity->toArray().
31
     *
32
     * @var null|array
33
     */
34
    private $info;
35
36
    public function __construct(AbstractBundle $extension = null, array $info = null)
37
    {
38
        $this->extension = $extension;
39
        $this->info = $info;
40
    }
41
42
    public function getExtension(): ?AbstractBundle
43
    {
44
        return $this->extension;
45
    }
46
47
    public function getInfo(): ?array
48
    {
49
        return $this->info;
50
    }
51
}
52