storageConfigurationPool = $storageConfigurationPool; $this->appConfig = $appConfig; } /** * Merge and retrieve configuration of storages like ids_storage or product_storage * in json format * * @return string * @since 102.0.0 */ public function getConfigurationJson() { $configuration = $this->getData('configuration') ?: []; foreach ($configuration as $namespace => & $storageConfig) { $dynamicStorage = $this->storageConfigurationPool->get($namespace); if ($dynamicStorage) { $storageConfig = array_replace_recursive($storageConfig, $dynamicStorage->get()); } $storageConfig['allowToSendRequest'] = $this->appConfig->getValue( Synchronizer::ALLOW_SYNC_WITH_BACKEND_PATH ); } return json_encode($configuration); } }