src/FondOfSpryker/Zed/BrandProduct/Persistence/BrandProductEntityManager.php
public function addBrandProductRelations(int $idProductAbstract, array $brandIds): void
    {
        if (count($brandIds) === 0) {
            return;
        }

        foreach ($brandIds as $brandId) {
            $entity = new FosBrandProduct();
            $entity->setFkProductAbstract($idProductAbstract)
                ->setFkBrand($brandId)
                ->save();
        }
    }
public function addBrandProductRelations(int $idProductAbstract, array $brandIds): void
    {
        if (count($brandIds) === 0) {
            return;
        }

        foreach ($brandIds as $brandId) {
            $entity = new FosBrandProduct();
            $entity->setFkProductAbstract($idProductAbstract)
                ->setFkBrand($brandId)
                ->save();
        }
    }
public function addBrandProductRelations ( int $ idProductAbstract , array $ brandIds ) : void { if ( count ( $ brandIds ) === 0 ) { return ; } foreach ( $ brandIds as $ brandId ) { $ entity = new FosBrandProduct ( ) ; $ entity -> setFkProductAbstract ( $ idProductAbstract ) -> setFkBrand ( $ brandId ) -> save ( ) ; } }
Add brand product relation

@param int $idProductAbstract
@param array $brandIds

@return void
Add brand product relation