import { Injectable } from '@angular/core' ; import { DaffProduct } from '@daffodil/product' ; import { MagentoProduct } from '../models/magento-product' ; import { DaffMagentoSimpleProductTransformers } from './simple-product-transformers' ; param product @ Injectable ( { providedIn : 'root' , } ) export class DaffMagentoProductsTransformer { constructor ( private magentoSimpleProductTransformers ) { } transformMagentoProduct ( product , mediaUrl ) { return this . magentoSimpleProductTransformers . transformMagentoSimpleProduct ( product , mediaUrl ) ; } /**
     * Transforms many magento MagentoProducts from the magento product query into DaffProducts.
     */ transformManyMagentoProducts ( products , mediaUrl ) { return products . map ( product => this . transformMagentoProduct ( product , mediaUrl ) ) ; } }