protected function createCombination(ConnectionInterface $con, ProductSaleElements $salesElement, $combinationAttributes)
    {
        foreach ($combinationAttributes as $attributeAvId) {
            $attributeAv = AttributeAvQuery::create()->findPk($attributeAvId);

            if ($attributeAv !== null) {
                $attributeCombination = new AttributeCombination();

                $attributeCombination
                    ->setAttributeAvId($attributeAvId)
                    ->setAttribute($attributeAv->getAttribute())
                    ->setProductSaleElements($salesElement)
                    ->save($con);
            }
        }
    }
protected function createCombination(ConnectionInterface $con, ProductSaleElements $salesElement, $combinationAttributes)
    {
        foreach ($combinationAttributes as $attributeAvId) {
            $attributeAv = AttributeAvQuery::create()->findPk($attributeAvId);

            if ($attributeAv !== null) {
                $attributeCombination = new AttributeCombination();

                $attributeCombination
                    ->setAttributeAvId($attributeAvId)
                    ->setAttribute($attributeAv->getAttribute())
                    ->setProductSaleElements($salesElement)
                    ->save($con);
            }
        }
    }
protected function createCombination ( ConnectionInterface $ con , ProductSaleElements $ salesElement , $ combinationAttributes ) { foreach ( $ combinationAttributes as $ attributeAvId ) { $ attributeAv = AttributeAvQuery :: create ( ) -> findPk ( $ attributeAvId ) ; if ( $ attributeAv !== null ) { $ attributeCombination = new AttributeCombination ( ) ; $ attributeCombination -> setAttributeAvId ( $ attributeAvId ) -> setAttribute ( $ attributeAv -> getAttribute ( ) ) -> setProductSaleElements ( $ salesElement ) -> save ( $ con ) ; } } }
Create a combination for a given product sale element

@param ConnectionInterface $con                   the Propel connection
@param ProductSaleElements $salesElement          the product sale element
@param array               $combinationAttributes an array oif attributes av IDs
@throws \Propel\Runtime\Exception\PropelException
Create a combination for a given product sale element