This repository has been archived by the owner on Feb 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'project/master'
# Conflicts: # composer.lock
- Loading branch information
Showing
8 changed files
with
192 additions
and
79 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
...WidgetProductSearchConnector/CmsContentWidgetProductSearchConnectorDependencyProvider.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
|
||
/** | ||
* This file is part of the Spryker Demoshop. | ||
* For full license information, please view the LICENSE file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Pyz\Yves\CmsContentWidgetProductSearchConnector; | ||
|
||
use Pyz\Yves\Product\Plugin\StorageProductMapperPlugin; | ||
use Spryker\Yves\CmsContentWidgetProductSearchConnector\CmsContentWidgetProductSearchConnectorDependencyProvider as SprykerCmsContentWidgetProductSearchConnectorDependencyProvider; | ||
use Spryker\Yves\Kernel\Container; | ||
|
||
class CmsContentWidgetProductSearchConnectorDependencyProvider extends SprykerCmsContentWidgetProductSearchConnectorDependencyProvider | ||
{ | ||
const STORAGE_PRODUCT_MAPPER_PLUGIN = 'STORAGE_PRODUCT_MAPPER_PLUGIN'; | ||
|
||
/** | ||
* @param \Spryker\Yves\Kernel\Container $container | ||
* | ||
* @return \Spryker\Yves\Kernel\Container | ||
*/ | ||
public function provideDependencies(Container $container) | ||
{ | ||
$container = parent::provideDependencies($container); | ||
|
||
$container = $this->addProductMapperPlugin($container); | ||
|
||
return $container; | ||
} | ||
|
||
/** | ||
* @param \Spryker\Yves\Kernel\Container $container | ||
* | ||
* @return \Spryker\Yves\Kernel\Container | ||
*/ | ||
protected function addProductMapperPlugin(Container $container): Container | ||
{ | ||
$container[static::STORAGE_PRODUCT_MAPPER_PLUGIN] = function (Container $container) { | ||
return new StorageProductMapperPlugin(); | ||
}; | ||
return $container; | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
.../CmsContentWidgetProductSearchConnector/CmsContentWidgetProductSearchConnectorFactory.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
/** | ||
* This file is part of the Spryker Demoshop. | ||
* For full license information, please view the LICENSE file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Pyz\Yves\CmsContentWidgetProductSearchConnector; | ||
|
||
use Spryker\Yves\CmsContentWidgetProductSearchConnector\CmsContentWidgetProductSearchConnectorFactory as SprykerCmsContentWidgetProductSearchConnectorFactory; | ||
|
||
class CmsContentWidgetProductSearchConnectorFactory extends SprykerCmsContentWidgetProductSearchConnectorFactory | ||
{ | ||
/** | ||
* @return \Pyz\Yves\Product\Dependency\Plugin\StorageProductMapperPluginInterface | ||
*/ | ||
public function getStorageProductMapperPlugin() | ||
{ | ||
return $this->getProvidedDependency(CmsContentWidgetProductSearchConnectorDependencyProvider::STORAGE_PRODUCT_MAPPER_PLUGIN); | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/Pyz/Yves/CmsContentWidgetProductSearchConnector/Plugin/CmsProductSearchWidgetPlugin.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
/** | ||
* This file is part of the Spryker Demoshop. | ||
* For full license information, please view the LICENSE file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Pyz\Yves\CmsContentWidgetProductSearchConnector\Plugin; | ||
|
||
use Spryker\Yves\CmsContentWidgetProductSearchConnector\Plugin\CmsProductSearchContentWidgetPlugin as SprykerCmsProductSearchContentWidgetPlugin; | ||
|
||
/** | ||
* @method \Pyz\Yves\CmsContentWidgetProductSearchConnector\CmsContentWidgetProductSearchConnectorFactory getFactory() | ||
*/ | ||
class CmsProductSearchWidgetPlugin extends SprykerCmsProductSearchContentWidgetPlugin | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected function hydrateProductStorageTransfer(array $productData) | ||
{ | ||
return $this->getFactory() | ||
->getStorageProductMapperPlugin() | ||
->mapStorageProduct($productData, []); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters