diff --git a/is_imageslider.php b/is_imageslider.php index e56c6f2..849566a 100644 --- a/is_imageslider.php +++ b/is_imageslider.php @@ -13,9 +13,8 @@ use Oksydan\IsImageslider\Hook\HookInterface; use Oksydan\IsImageslider\Installer\ImageSliderInstaller; use PrestaShop\PrestaShop\Adapter\SymfonyContainer; -use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; use PrestaShop\PrestaShop\Core\Module\WidgetInterface; - +use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; class Is_imageslider extends Module implements WidgetInterface { @@ -141,12 +140,14 @@ private function getHookObject($methodName) public function renderWidget($hookName, array $configuration) { $widgetCapability = $this->get('oksydan.is_imageslider.hook.widget_capability'); + return $widgetCapability->renderWidget($configuration); } public function getWidgetVariables($hookName, array $configuration) { $widgetCapability = $this->get('oksydan.is_imageslider.hook.widget_capability'); + return $widgetCapability->getWidgetVariables($configuration); } } diff --git a/src/Hook/WidgetCapability.php b/src/Hook/WidgetCapability.php index 18a4e90..8e07ec0 100644 --- a/src/Hook/WidgetCapability.php +++ b/src/Hook/WidgetCapability.php @@ -16,7 +16,6 @@ protected function getCacheKey(): string return parent::getCacheKey() . '_' . ($this->context->isMobile() ? 'mobile' : 'desktop'); } - /** * @return array */ @@ -37,6 +36,7 @@ private function getSlides(): array return $slides; } + public function getWidgetVariables($params): array { return [ @@ -49,7 +49,8 @@ public function getWidgetVariables($params): array ]; } - public function renderWidget($params) { + public function renderWidget($params) + { return $this->execute($params); } }