ConfigureActionEvent   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 27
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getOptionsResolver() 0 4 1
1
<?php
2
3
namespace Pim\Bundle\CustomEntityBundle\Event;
4
5
use Pim\Bundle\CustomEntityBundle\Action\ActionInterface;
6
use Symfony\Component\OptionsResolver\OptionsResolver;
7
8
/**
9
 * Event for action configuration
10
 *
11
 * @author    Antoine Guigan <[email protected]>
12
 * @copyright 2013 Akeneo SAS (http://www.akeneo.com)
13
 * @license   http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
14
 */
15
class ConfigureActionEvent extends ActionEvent
16
{
17
    /**
18
     * @var OptionsResolver
19
     */
20
    protected $optionsResolver;
21
22
    /**
23
     * @param ActionInterface $action
24
     * @param OptionsResolver $optionsResolver
25
     */
26
    public function __construct(ActionInterface $action, OptionsResolver $optionsResolver)
27
    {
28
        parent::__construct($action);
29
        $this->optionsResolver = $optionsResolver;
30
    }
31
32
    /**
33
     * Returns the options resolver for the action
34
     *
35
     * @return OptionsResolver
36
     */
37
    public function getOptionsResolver()
38
    {
39
        return $this->optionsResolver;
40
    }
41
}
42