File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ public function __construct(ConfigResolverInterface $configResolver)
3434 */
3535 public function aPagelayoutIsConfigured ()
3636 {
37- Assertion::assertTrue ($ this ->configResolver ->hasParameter ('pagelayout ' ));
37+ Assertion::assertTrue ($ this ->configResolver ->hasParameter ('page_layout ' ));
3838 }
3939
4040 /**
@@ -50,8 +50,6 @@ public function itIsRenderedUsingTheConfiguredPagelayout()
5050
5151 public function getPageLayout (): string
5252 {
53- return $ this ->configResolver ->hasParameter ('page_layout ' )
54- ? $ this ->configResolver ->getParameter ('page_layout ' , null , 'site ' )
55- : $ this ->configResolver ->getParameter ('pagelayout ' , null , 'site ' );
53+ return $ this ->configResolver ->getParameter ('page_layout ' , null , 'site ' );
5654 }
5755}
Original file line number Diff line number Diff line change @@ -37,18 +37,17 @@ public static function getSubscribedEvents(): array
3737
3838 /**
3939 * If the event's view has a defined template, sets the view's template identifier,
40- * and the 'pagelayout ' parameter.
40+ * and the 'page_layout ' parameter.
4141 */
4242 public function setViewTemplates (PreContentViewEvent $ event ): void
4343 {
4444 $ view = $ event ->getContentView ();
45- $ pagelayout = $ this ->configResolver ->getParameter ('pagelayout ' );
45+ $ pageLayout = $ this ->configResolver ->getParameter ('page_layout ' );
4646
4747 foreach ($ this ->getTemplatesMap () as $ viewClass => $ template ) {
4848 if ($ view instanceof $ viewClass ) {
4949 $ view ->setTemplateIdentifier ($ template );
50- $ view ->addParameters (['pagelayout ' => $ pagelayout ]);
51- $ view ->addParameters (['page_layout ' => $ pagelayout ]);
50+ $ view ->addParameters (['page_layout ' => $ pageLayout ]);
5251 }
5352 }
5453 }
You can’t perform that action at this time.
0 commit comments