protected function initializeProductMediaGalleryValueToEntity(array $attr)
    {

        // load the value/entity ID
        $valueId = $attr[MemberNames::VALUE_ID];
        $entityId = $attr[MemberNames::ENTITY_ID];

        // query whether the product media gallery value to entity entity already exists or not
        if ($this->loadProductMediaGalleryValueToEntity($valueId, $entityId)) {
            return;
        }

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

        // load the value/entity ID
        $valueId = $attr[MemberNames::VALUE_ID];
        $entityId = $attr[MemberNames::ENTITY_ID];

        // query whether the product media gallery value to entity entity already exists or not
        if ($this->loadProductMediaGalleryValueToEntity($valueId, $entityId)) {
            return;
        }

        // simply return the attributes
        return $attr;
    }
protected function initializeProductMediaGalleryValueToEntity ( array $ attr ) { // load the value/entity ID $ valueId = $ attr [ MemberNames :: VALUE_ID ] ; $ entityId = $ attr [ MemberNames :: ENTITY_ID ] ; // query whether the product media gallery value to entity entity already exists or not if ( $ this -> loadProductMediaGalleryValueToEntity ( $ valueId , $ entityId ) ) { return ; } // simply return the attributes return $ attr ; }
Initialize the product media gallery value to entity with the passed attributes and returns an instance.

@param array $attr The product media gallery value to entity attributes

@return array|null The initialized product media gallery value to entity, or NULL if the product media gallery value to entity already exists
Initialize the product media gallery value to entity with the passed attributes and returns an instance .