Completed
Pull Request — 5.6 (#2830)
by Jeroen
14:14
created

src/Kunstmaan/NodeBundle/Event/AdaptFormEvent.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace Kunstmaan\NodeBundle\Event;
4
5
use Kunstmaan\AdminBundle\Helper\FormWidgets\Tabs\TabPane;
6
use Kunstmaan\NodeBundle\Entity\HasNodeInterface;
7
use Kunstmaan\NodeBundle\Entity\Node;
8
use Kunstmaan\NodeBundle\Entity\NodeTranslation;
9
use Kunstmaan\NodeBundle\Entity\NodeVersion;
10
use Symfony\Component\EventDispatcher\Event;
11
use Symfony\Component\HttpFoundation\Request;
12
13
/**
14
 * The event to pass metadata if the adaptForm event is triggered
15
 */
16
class AdaptFormEvent extends Event
0 ignored issues
show
Deprecated Code introduced by
The class Symfony\Component\EventDispatcher\Event has been deprecated with message: since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event" instead

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
17
{
18
    /**
19
     * @var TabPane
20
     */
21
    private $tabPane;
22
23
    /**
24
     * @var
25
     */
26
    private $page;
27
28
    /**
29
     * @var Node
30
     */
31
    private $node;
32
33
    /**
34
     * @var NodeTranslation
35
     */
36
    private $nodeTranslation;
37
38
    /**
39
     * @var NodeVersion
40
     */
41
    private $nodeVersion;
42
43
    /**
44
     * @var Request
45
     */
46
    private $request;
47
48
    /**
49
     * @param TabPane          $tabPane         The tab pane
50
     * @param HasNodeInterface $page            The page
51
     * @param Node             $node            The node
52
     * @param NodeTranslation  $nodeTranslation The node translation
53
     * @param NodeVersion      $nodeVersion     The node version
54
     */
55 2
    public function __construct(Request $request, TabPane $tabPane, $page = null, Node $node = null, NodeTranslation $nodeTranslation = null, NodeVersion $nodeVersion = null)
56
    {
57 2
        $this->request = $request;
58 2
        $this->tabPane = $tabPane;
59 2
        $this->page = $page;
60 2
        $this->node = $node;
61 2
        $this->nodeTranslation = $nodeTranslation;
62 2
        $this->nodeVersion = $nodeVersion;
63 2
    }
64
65
    /**
66
     * @return Node
67
     */
68 1
    public function getNode()
69
    {
70 1
        return $this->node;
71
    }
72
73
    /**
74
     * @return NodeTranslation
75
     */
76 1
    public function getNodeTranslation()
77
    {
78 1
        return $this->nodeTranslation;
79
    }
80
81
    /**
82
     * @return NodeVersion
83
     */
84 1
    public function getNodeVersion()
85
    {
86 1
        return $this->nodeVersion;
87
    }
88
89
    /**
90
     * @return
91
     */
92 2
    public function getPage()
93
    {
94 2
        return $this->page;
95
    }
96
97
    /**
98
     * @return TabPane
99
     */
100 2
    public function getTabPane()
101
    {
102 2
        return $this->tabPane;
103
    }
104
105 1
    public function getRequest()
106
    {
107 1
        return $this->request;
108
    }
109
}
110