PreRenderActionEvent   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 57
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1
Metric Value
wmc 5
lcom 0
cbo 1
dl 0
loc 57
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getTemplate() 0 4 1
A getTemplateVars() 0 4 1
A setTemplate() 0 4 1
A setTemplateVars() 0 4 1
1
<?php
2
3
namespace Pim\Bundle\CustomEntityBundle\Event;
4
5
use Pim\Bundle\CustomEntityBundle\Action\ActionInterface;
6
7
/**
8
 * @author    Antoine Guigan <[email protected]>
9
 * @copyright 2013 Akeneo SAS (http://www.akeneo.com)
10
 * @license   http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
11
 */
12
class PreRenderActionEvent extends ActionEvent
13
{
14
    /**
15
     * @var string
16
     */
17
    protected $template;
18
19
    /**
20
     * @var array
21
     */
22
    protected $templateVars;
23
24
    /**
25
     * @param ActionInterface $action
26
     * @param string          $template
27
     * @param array           $templateVars
28
     */
29
    public function __construct(ActionInterface $action, $template, array $templateVars)
30
    {
31
        parent::__construct($action);
32
33
        $this->template = $template;
34
        $this->templateVars = $templateVars;
35
    }
36
37
    /**
38
     * @return string
39
     */
40
    public function getTemplate()
41
    {
42
        return $this->template;
43
    }
44
45
    /**
46
     * @return array
47
     */
48
    public function getTemplateVars()
49
    {
50
        return $this->templateVars;
51
    }
52
53
    /**
54
     * @param string $template
55
     */
56
    public function setTemplate($template)
57
    {
58
        $this->template = $template;
59
    }
60
61
    /**
62
     * @param array $templateVars
63
     */
64
    public function setTemplateVars($templateVars)
65
    {
66
        $this->templateVars = $templateVars;
67
    }
68
}
69