diff --git a/src/lib/Behat/Context/PagelayoutContext.php b/src/lib/Behat/Context/PagelayoutContext.php index a47f1f5..755a2ae 100644 --- a/src/lib/Behat/Context/PagelayoutContext.php +++ b/src/lib/Behat/Context/PagelayoutContext.php @@ -34,7 +34,7 @@ public function __construct(ConfigResolverInterface $configResolver) */ public function aPagelayoutIsConfigured() { - Assertion::assertTrue($this->configResolver->hasParameter('pagelayout')); + Assertion::assertTrue($this->configResolver->hasParameter('page_layout')); } /** @@ -50,8 +50,6 @@ public function itIsRenderedUsingTheConfiguredPagelayout() public function getPageLayout(): string { - return $this->configResolver->hasParameter('page_layout') - ? $this->configResolver->getParameter('page_layout', null, 'site') - : $this->configResolver->getParameter('pagelayout', null, 'site'); + return $this->configResolver->getParameter('page_layout', null, 'site'); } } diff --git a/src/lib/EventListener/ViewTemplatesListener.php b/src/lib/EventListener/ViewTemplatesListener.php index 9e1df92..b8995bc 100644 --- a/src/lib/EventListener/ViewTemplatesListener.php +++ b/src/lib/EventListener/ViewTemplatesListener.php @@ -37,18 +37,17 @@ public static function getSubscribedEvents() /** * If the event's view has a defined template, sets the view's template identifier, - * and the 'pagelayout' parameter. + * and the 'page_layout' parameter. */ public function setViewTemplates(PreContentViewEvent $event): void { $view = $event->getContentView(); - $pagelayout = $this->configResolver->getParameter('pagelayout'); + $pageLayout = $this->configResolver->getParameter('page_layout'); foreach ($this->getTemplatesMap() as $viewClass => $template) { if ($view instanceof $viewClass) { $view->setTemplateIdentifier($template); - $view->addParameters(['pagelayout' => $pagelayout]); - $view->addParameters(['page_layout' => $pagelayout]); + $view->addParameters(['page_layout' => $pageLayout]); } } }