1 | <?php |
||
8 | class PageTemplateConfigurationParser implements PageTemplateConfigurationParserInterface |
||
9 | { |
||
10 | /** |
||
11 | * @var KernelInterface |
||
12 | */ |
||
13 | private $kernel; |
||
14 | |||
15 | private $presets = []; |
||
16 | |||
17 | /** |
||
18 | * @param KernelInterface $kernel |
||
19 | * @param array $presets |
||
20 | */ |
||
21 | 2 | public function __construct(KernelInterface $kernel, array $presets = []) |
|
26 | |||
27 | /** |
||
28 | * This will read the $name file and parse it to the PageTemplate |
||
29 | * |
||
30 | * @param string $name |
||
31 | * |
||
32 | * @return PageTemplateInterface |
||
33 | * |
||
34 | * @throws \Exception |
||
35 | */ |
||
36 | 2 | public function parse($name) |
|
57 | |||
58 | /** |
||
59 | * This builds a Region out of the rawRegion from the Yaml |
||
60 | * |
||
61 | * @param array $rawRegion |
||
62 | * |
||
63 | * @return Region |
||
64 | */ |
||
65 | 2 | private function buildRegion($rawRegion) |
|
87 | |||
88 | /** |
||
89 | * This builds a Row out of the rawRow from the Yaml |
||
90 | * |
||
91 | * @param array $rawRow |
||
92 | * |
||
93 | * @return Row |
||
94 | */ |
||
95 | private function buildRow($rawRow) |
||
105 | |||
106 | /** |
||
107 | * @param $name |
||
108 | * |
||
109 | * @return array |
||
110 | * |
||
111 | * @throws \Exception |
||
112 | */ |
||
113 | 2 | private function getRawData($name) |
|
133 | } |
||
134 |