protected function initializeProductMediaGalleryValue(array $attr)
    {

        // load the value/store/parent ID
        $valueId = $attr[MemberNames::VALUE_ID];
        $storeId = $attr[MemberNames::STORE_ID];
        $entityId = $attr[MemberNames::ENTITY_ID];

        // query whether the product media gallery value already exists or not
        if ($entity = $this->loadProductMediaGalleryValue($valueId, $storeId, $entityId)) {
            return $this->mergeEntity($entity, $attr);
        }

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

        // load the value/store/parent ID
        $valueId = $attr[MemberNames::VALUE_ID];
        $storeId = $attr[MemberNames::STORE_ID];
        $entityId = $attr[MemberNames::ENTITY_ID];

        // query whether the product media gallery value already exists or not
        if ($entity = $this->loadProductMediaGalleryValue($valueId, $storeId, $entityId)) {
            return $this->mergeEntity($entity, $attr);
        }

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

@param array $attr The product media gallery value attributes

@return array The initialized product media gallery value
Initialize the product media gallery value with the passed attributes and returns an instance .