Adapter/PlentymarketsAdapter/ResponseParser/Product/ProductResponseParser.php
private function getDafaultCategories(array $mainVariation)
    {
        $defaultCategories = [];

        foreach ($mainVariation['variationDefaultCategory'] as $category) {
            $categoryIdentity = $this->identityService->findOneBy([
                'adapterIdentifier' => (string) $category['branchId'],
                'adapterName' => PlentymarketsAdapter::NAME,
                'objectType' => Category::TYPE,
            ]);

            if (null === $categoryIdentity) {
                $this->logger->notice('missing mapping for category', ['category' => $category]);

                continue;
            }

            $defaultCategories[] = $categoryIdentity->getObjectIdentifier();
        }

        return $defaultCategories;
    }
private function getDafaultCategories(array $mainVariation)
    {
        $defaultCategories = [];

        foreach ($mainVariation['variationDefaultCategory'] as $category) {
            $categoryIdentity = $this->identityService->findOneBy([
                'adapterIdentifier' => (string) $category['branchId'],
                'adapterName' => PlentymarketsAdapter::NAME,
                'objectType' => Category::TYPE,
            ]);

            if (null === $categoryIdentity) {
                $this->logger->notice('missing mapping for category', ['category' => $category]);

                continue;
            }

            $defaultCategories[] = $categoryIdentity->getObjectIdentifier();
        }

        return $defaultCategories;
    }
private function getDafaultCategories ( array $ mainVariation ) { $ defaultCategories = [ ] ; foreach ( $ mainVariation [ 'variationDefaultCategory' ] as $ category ) { $ categoryIdentity = $ this -> identityService -> findOneBy ( [ 'adapterIdentifier' => ( string ) $ category [ 'branchId' ] , 'adapterName' => PlentymarketsAdapter :: NAME , 'objectType' => Category :: TYPE , ] ) ; if ( null === $ categoryIdentity ) { $ this -> logger -> notice ( 'missing mapping for category' , [ 'category' => $ category ] ) ; continue ; } $ defaultCategories [ ] = $ categoryIdentity -> getObjectIdentifier ( ) ; } return $ defaultCategories ; }
@param array $mainVariation

@return array
@param array $mainVariation