public function testEvent()
 {
     $data = ['test'];
     $event = new ProductGridWidgetRenderEvent($data);
     $this->assertSame($data, $event->getWidgetRouteParameters());
     $modifiedData = ['test1'];
     $event->setWidgetRouteParameters($modifiedData);
     $this->assertSame($modifiedData, $event->getWidgetRouteParameters());
 }
 /**
  * @param ProductGridWidgetRenderEvent $event
  */
 public function onWidgetRender(ProductGridWidgetRenderEvent $event)
 {
     $params = $event->getWidgetRouteParameters();
     $params[PriceListRequestHandler::PRICE_LIST_KEY] = $this->priceListRequestHandler->getPriceList()->getId();
     $params[PriceListRequestHandler::PRICE_LIST_CURRENCY_KEY] = $this->priceListRequestHandler->getPriceListSelectedCurrencies();
     $params[PriceListRequestHandler::TIER_PRICES_KEY] = $this->priceListRequestHandler->getShowTierPrices();
     $event->setWidgetRouteParameters($params);
 }
 /**
  * @param ProductGridWidgetRenderEvent $event
  */
 public function onWidgetRender(ProductGridWidgetRenderEvent $event)
 {
     $params = $event->getWidgetRouteParameters();
     $gridParameters = $this->requestParameterBagFactory->createParameters();
     $event->setWidgetRouteParameters(array_merge($params, [RequestParameterBagFactory::DEFAULT_ROOT_PARAM => $gridParameters->all()]));
 }