1 | <?php |
||
26 | class PageTemplateWidget extends FormWidget |
||
27 | { |
||
28 | /** |
||
29 | * @var EntityManagerInterface |
||
30 | */ |
||
31 | private $em; |
||
32 | |||
33 | /** |
||
34 | * @var PagePartAdminFactory |
||
35 | */ |
||
36 | private $pagePartAdminFactory; |
||
37 | |||
38 | /** |
||
39 | * @var PageInterface |
||
40 | */ |
||
41 | private $page; |
||
42 | |||
43 | /** |
||
44 | * @var Request |
||
45 | */ |
||
46 | private $request; |
||
47 | |||
48 | /** |
||
49 | * @var PagePartWidget[] |
||
50 | */ |
||
51 | private $widgets = array(); |
||
52 | |||
53 | /** |
||
54 | * @var PageTemplateInterface[] |
||
55 | */ |
||
56 | private $pageTemplates = array(); |
||
57 | |||
58 | /** |
||
59 | * @var PagePartAdminConfiguratorInterface[] |
||
60 | */ |
||
61 | private $pagePartAdminConfigurations = array(); |
||
62 | |||
63 | /** |
||
64 | * @var PageTemplateConfiguration |
||
65 | */ |
||
66 | protected $pageTemplateConfiguration; |
||
67 | |||
68 | /** |
||
69 | * @param HasPageTemplateInterface $page |
||
70 | * @param Request $request |
||
71 | * @param EntityManagerInterface $em |
||
72 | * @param PagePartAdminFactory $pagePartAdminFactory |
||
73 | * @param PageTemplateConfigurationReaderInterface $templateReader |
||
74 | * @param PagePartConfigurationReaderInterface $pagePartReader |
||
75 | * @param PageTemplateConfigurationService $pageTemplateConfigurationService |
||
76 | */ |
||
77 | public function __construct( |
||
103 | |||
104 | /** |
||
105 | * @param Region $region The region |
||
106 | */ |
||
107 | private function processRegion($region) |
||
117 | |||
118 | /** |
||
119 | * @param Region $region The region |
||
120 | */ |
||
121 | private function loadWidgets($region) |
||
135 | |||
136 | /** |
||
137 | * @return PageTemplateInterface |
||
138 | */ |
||
139 | public function getPageTemplate() |
||
143 | |||
144 | /** |
||
145 | * @return PageTemplateInterface[] |
||
146 | */ |
||
147 | public function getPageTemplates() |
||
151 | |||
152 | /** |
||
153 | * @return PageInterface|HasPageTemplateInterface |
||
154 | */ |
||
155 | public function getPage() |
||
159 | |||
160 | /** |
||
161 | * @param FormBuilderInterface $builder The form builder |
||
162 | */ |
||
163 | public function buildForm(FormBuilderInterface $builder) |
||
169 | |||
170 | /** |
||
171 | * @param Request $request |
||
172 | */ |
||
173 | public function bindRequest(Request $request) |
||
181 | |||
182 | /** |
||
183 | * @param EntityManager $em The entity manager |
||
184 | */ |
||
185 | public function persist(EntityManager $em) |
||
192 | |||
193 | /** |
||
194 | * @param FormView $formView |
||
195 | * |
||
196 | * @return array |
||
197 | */ |
||
198 | public function getFormErrors(FormView $formView) |
||
208 | |||
209 | /** |
||
210 | * @return string |
||
211 | */ |
||
212 | public function getTemplate() |
||
216 | |||
217 | /** |
||
218 | * @param string $name |
||
219 | * |
||
220 | * @return PagePartAdmin |
||
221 | */ |
||
222 | public function getFormWidget($name) |
||
230 | |||
231 | /** |
||
232 | * @param Request $request |
||
233 | * |
||
234 | * @return array |
||
235 | */ |
||
236 | public function getExtraParams(Request $request) |
||
240 | } |
||
241 |