Skip to content

Commit

Permalink
Merge pull request #3 from atravkovs/customWidgetsSupport
Browse files Browse the repository at this point in the history
Fixed widgets not working inside CMS Blocks
  • Loading branch information
alfredsgenkins authored Sep 12, 2019
2 parents 3b34739 + a6e6bb4 commit 1af5384
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* Class FilterEmulate
* @package ScandiPWA\CmsGraphQl\Model\Template
*/
class FilterEmulate extends \Magento\Widget\Model\Template\FilterEmulate
class Filter extends \Magento\Widget\Model\Template\FilterEmulate
{

/**
Expand Down
5 changes: 3 additions & 2 deletions src/etc/di.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<virtualType name="ScandiPWA\CmsGraphQl\Model\Template\VirtualFilterEmulate" type="ScandiPWA\CmsGraphQl\Model\Template\FilterEmulate">
<virtualType name="ScandiPWA\CmsGraphQl\Model\Template\VirtualFilter" type="ScandiPWA\CmsGraphQl\Model\Template\Filter">
<arguments>
<argument name="availableFilters" xsi:type="array">
<item name="Slider" xsi:type="string">Scandiweb\Slider\Block\Widget\Slider</item>
Expand All @@ -17,6 +17,7 @@
</virtualType>

<preference for="Magento\CmsGraphQl\Model\Resolver\Page" type="ScandiPWA\CmsGraphQl\Model\Resolver\Page"/>
<preference for="Magento\Widget\Model\Template\FilterEmulate" type="ScandiPWA\CmsGraphQl\Model\Template\VirtualFilterEmulate"/>
<preference for="Magento\Widget\Model\Template\Filter" type="ScandiPWA\CmsGraphQl\Model\Template\VirtualFilter"/>
<preference for="Magento\Widget\Model\Template\FilterEmulate" type="ScandiPWA\CmsGraphQl\Model\Template\VirtualFilter"/>
<preference for="Magento\CmsGraphQl\Model\Resolver\DataProvider\Block" type="ScandiPWA\CmsGraphQl\Model\Resolver\DataProvider\Block"/>
</config>

0 comments on commit 1af5384

Please sign in to comment.