1 | <?php |
||
17 | class Configuration implements ConfigurationInterface |
||
18 | { |
||
19 | /** @var EventDispatcherInterface */ |
||
20 | protected $eventDispatcher; |
||
21 | |||
22 | /** @var string */ |
||
23 | protected $name; |
||
24 | |||
25 | /** @var string */ |
||
26 | protected $entityClass; |
||
27 | |||
28 | /** @var string[] */ |
||
29 | protected $actions = []; |
||
30 | |||
31 | /** @var array[] */ |
||
32 | protected $actionOptions = []; |
||
33 | |||
34 | /** @var array[] */ |
||
35 | protected $options = []; |
||
36 | |||
37 | /** |
||
38 | * @param EventDispatcherInterface $eventDispatcher |
||
39 | * @param string $name |
||
40 | * @param string $entityClass |
||
41 | * @param array $options |
||
42 | */ |
||
43 | public function __construct(EventDispatcherInterface $eventDispatcher, $name, $entityClass, array $options = []) |
||
52 | |||
53 | /** |
||
54 | * Adds an action for the current entity |
||
55 | * |
||
56 | * @param string $type |
||
57 | * @param string $action |
||
58 | * @param array $options |
||
59 | */ |
||
60 | public function addAction($type, $action, array $options = []) |
||
65 | |||
66 | /** |
||
67 | * {@inheritdoc} |
||
68 | */ |
||
69 | public function getAction($type) |
||
73 | |||
74 | /** |
||
75 | * {@inheritdoc} |
||
76 | */ |
||
77 | public function getActionOptions($type) |
||
81 | |||
82 | /** |
||
83 | * {@inheritdoc} |
||
84 | */ |
||
85 | public function getEntityClass() |
||
89 | |||
90 | /** |
||
91 | * {@inheritdoc} |
||
92 | */ |
||
93 | public function getName() |
||
97 | |||
98 | /** |
||
99 | * {@inheritdoc} |
||
100 | */ |
||
101 | public function hasAction($type) |
||
105 | |||
106 | /** |
||
107 | * {@inheritdoc} |
||
108 | */ |
||
109 | public function getOptions() |
||
113 | |||
114 | /** |
||
115 | * Sets the default options |
||
116 | * |
||
117 | * @param OptionsResolver $resolver |
||
118 | */ |
||
119 | protected function setDefaultOptions(OptionsResolver $resolver) |
||
125 | } |
||
126 |