Skip to content

Commit

Permalink
Merge branch 'master' into emulate-graphql
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksandrsKondratjevs authored Feb 14, 2023
2 parents d9fe2be + 6b228b9 commit 214eb9a
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/Controller/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
use Magento\Catalog\Api\CategoryRepositoryInterface;
use Magento\Catalog\Model\Product\Attribute\Source\Status;
use ScandiPWA\CmsGraphQl\Model\Resolver\DataProvider\Page as PageProvider;
use Magento\Framework\Filter\Template as WidgetTemplate;
use Magento\Cms\Api\GetPageByIdentifierInterface;
use Magento\Framework\Filter\Template\Tokenizer\Parameter as TokenizerParameter;
use ScandiPWA\SliderGraphQl\Model\Resolver\Slider as SliderResolver;

Expand Down Expand Up @@ -129,11 +129,6 @@ class Router extends BaseRouter
*/
protected $sliderResolver;

/**
* @var WidgetTemplate
*/
protected $widgetTemplate;

/**
* Router constructor.
* @param ActionList $actionList
Expand Down Expand Up @@ -340,12 +335,6 @@ protected function getSliderInformation($content)
$this->tokenizerParameter->setString($match[0] ?? '');
$params = $this->tokenizerParameter->tokenize();

foreach ($params as $key => $value) {
if (substr($value, 0, 1) === '$') {
$params[$key] = $this->widgetTemplate->getVariable(substr($value, 1), null);
}
}

if (isset($params['slider_id'])) {
return $this->sliderResolver->getSlider($params['slider_id']);
}
Expand Down

0 comments on commit 214eb9a

Please sign in to comment.