src/Observers/AbstractProductRelationUpdateObserver.php
protected function initializeProductRelation(array $attr)
    {

        // laod child/parent ID
        $childId = $attr[MemberNames::CHILD_ID];
        $parentId = $attr[MemberNames::PARENT_ID];

        // query whether or not the product relation already exists
        if ($this->loadProductRelation($parentId, $childId)) {
            return;
        }

        // simply return the attributes
        return $attr;
    }
protected function initializeProductRelation(array $attr)
    {

        // laod child/parent ID
        $childId = $attr[MemberNames::CHILD_ID];
        $parentId = $attr[MemberNames::PARENT_ID];

        // query whether or not the product relation already exists
        if ($this->loadProductRelation($parentId, $childId)) {
            return;
        }

        // simply return the attributes
        return $attr;
    }
protected function initializeProductRelation ( array $ attr ) { // laod child/parent ID $ childId = $ attr [ MemberNames :: CHILD_ID ] ; $ parentId = $ attr [ MemberNames :: PARENT_ID ] ; // query whether or not the product relation already exists if ( $ this -> loadProductRelation ( $ parentId , $ childId ) ) { return ; } // simply return the attributes return $ attr ; }
Initialize the product relation with the passed attributes and returns an instance.

@param array $attr The product relation attributes

@return array|null The initialized product relation, or null if the relation already exsist
Initialize the product relation with the passed attributes and returns an instance .