slideRepository = $slideRepository; $this->slidePresenter = $slidePresenter; $this->templateCache = $templateCache; } public function execute(array $params): string { if (!$this->shouldBlockBeDisplayed($params)) { return ''; } $this->templateCache->clearTemplateCacheIfNeeded($this->context->shop->id); if (!$this->isTemplateCached()) { $this->assignTemplateVariables($params); } return $this->module->fetch($this->getTemplateFullPath(), $this->getCacheKey()); } protected function getCacheKey(): string { return $this->module->getCacheId(); } protected function isTemplateCached(): bool { return $this->module->isCached($this->getTemplateFullPath(), $this->getCacheKey()); } }