Esempio n. 1
0
 /**
  * @param PluginStruct[] $plugins
  * @param BaseRequest $context
  * @return PluginStruct[]
  */
 private function getAdditionallyStoreData($plugins, BaseRequest $context)
 {
     $names = array_keys($plugins);
     $storeContext = new PluginsByTechnicalNameRequest($context->getLocale(), $context->getShopwareVersion(), $names);
     $store = $this->storePluginService->getPlugins($storeContext);
     $merged = [];
     foreach ($plugins as $plugin) {
         $key = strtolower($plugin->getTechnicalName());
         if (!array_key_exists($key, $store)) {
             $merged[$key] = $plugin;
             continue;
         }
         $storePlugin = $store[$key];
         $this->hydrator->assignStorePluginStruct($plugin, $storePlugin);
         $merged[$key] = $plugin;
     }
     return $merged;
 }
 /**
  * @param string $shopwareVersion
  * @param string $locale
  * @param string $domain
  * @param AccessTokenStruct $token
  */
 public function __construct($shopwareVersion, $locale, $domain, AccessTokenStruct $token)
 {
     $this->domain = $domain;
     $this->token = $token;
     parent::__construct($locale, $shopwareVersion);
 }