diff --git a/composer.json b/composer.json index 1cd647d..42ef0a2 100644 --- a/composer.json +++ b/composer.json @@ -8,11 +8,9 @@ }, "require-dev": { "spryker/code-sniffer": "*", - "spryker/testify": "*", - "spryker-shop/shop-application": "^1.1.1" + "spryker/testify": "*" }, "suggest": { - "spryker-shop/shop-application": "Use this module when using plugins that need ShopApplication dependencies." }, "autoload": { "psr-4": { diff --git a/src/SprykerShop/Yves/TabsWidget/Theme/default/views/tabs/tabs.twig b/src/SprykerShop/Yves/TabsWidget/Theme/default/views/tabs/tabs.twig index 4ab0044..ecbe45a 100644 --- a/src/SprykerShop/Yves/TabsWidget/Theme/default/views/tabs/tabs.twig +++ b/src/SprykerShop/Yves/TabsWidget/Theme/default/views/tabs/tabs.twig @@ -7,12 +7,12 @@ } %} {% block body %} -{% include molecule('search-tabs', 'TabsWidget') with { - class: 'grid', - data: { - tabs: data.tabs, - searchString: data.searchString, - requestParams: data.requestParams - } -} only %} + {% include molecule('search-tabs', 'TabsWidget') with { + class: 'grid', + data: { + tabs: data.tabs, + searchString: data.searchString, + requestParams: data.requestParams + } + } only %} {% endblock %} diff --git a/src/SprykerShop/Yves/TabsWidget/Plugin/ShopApplication/FullTextSearchTabsWidgetPlugin.php b/src/SprykerShop/Yves/TabsWidget/Widget/FullTextSearchTabsWidget.php similarity index 81% rename from src/SprykerShop/Yves/TabsWidget/Plugin/ShopApplication/FullTextSearchTabsWidgetPlugin.php rename to src/SprykerShop/Yves/TabsWidget/Widget/FullTextSearchTabsWidget.php index 6af6bae..2a5ae31 100644 --- a/src/SprykerShop/Yves/TabsWidget/Plugin/ShopApplication/FullTextSearchTabsWidgetPlugin.php +++ b/src/SprykerShop/Yves/TabsWidget/Widget/FullTextSearchTabsWidget.php @@ -5,55 +5,45 @@ * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. */ -namespace SprykerShop\Yves\TabsWidget\Plugin\ShopApplication; +namespace SprykerShop\Yves\TabsWidget\Widget; use Generated\Shared\Transfer\FullTextSearchTabTransfer; use Generated\Shared\Transfer\TabMetaDataTransfer; -use Spryker\Yves\Kernel\Widget\AbstractWidgetPlugin; -use SprykerShop\Yves\ShopApplication\Dependency\Plugin\TabsWidget\FullTextSearchTabsWidgetPluginInterface; +use Spryker\Yves\Kernel\Widget\AbstractWidget; use SprykerShop\Yves\TabsWidgetExtension\Plugin\FullTextSearchTabPluginInterface; /** * @method \SprykerShop\Yves\TabsWidget\TabsWidgetFactory getFactory() */ -class FullTextSearchTabsWidgetPlugin extends AbstractWidgetPlugin implements FullTextSearchTabsWidgetPluginInterface +class FullTextSearchTabsWidget extends AbstractWidget { /** - * {@inheritdoc} - * - * @api - * - * @return string + * @param string $searchString + * @param string $activeTabName + * @param array $requestParams */ - public static function getName(): string + public function __construct(string $searchString, string $activeTabName, array $requestParams = []) { - return static::NAME; + $this + ->addParameter('tabs', $this->getTabs($searchString, $activeTabName, $requestParams)) + ->addParameter('searchString', $searchString) + ->addParameter('requestParams', $requestParams); } /** - * {@inheritdoc} - * - * @api - * * @return string */ - public static function getTemplate(): string + public static function getName(): string { - return '@TabsWidget/views/tabs/tabs.twig'; + return 'FullTextSearchTabsWidget'; } /** - * @param string $searchString - * @param string $activeTabName - * @param array $requestParams - * - * @return void + * @return string */ - public function initialize(string $searchString, string $activeTabName, array $requestParams = []): void + public static function getTemplate(): string { - $this->addParameter('tabs', $this->getTabs($searchString, $activeTabName, $requestParams)) - ->addParameter('searchString', $searchString) - ->addParameter('requestParams', $requestParams); + return '@TabsWidget/views/tabs/tabs.twig'; } /**