protected function prepareProductMediaGalleryAttributes()
    {

        // load the attribute ID of the media gallery EAV attribute
        $mediaGalleryAttribute = $this->getEavAttributeByAttributeCode(MediaGalleryObserver::ATTRIBUTE_CODE);
        $attributeId = $mediaGalleryAttribute[MemberNames::ATTRIBUTE_ID];

        // initialize the gallery data
        $disabled = 0;
        $mediaType = 'image';
        $image = $this->getValue(ColumnKeys::IMAGE_PATH_NEW);

        // initialize and return the entity
        return $this->initializeEntity(
            array(
                MemberNames::ATTRIBUTE_ID => $attributeId,
                MemberNames::VALUE        => $image,
                MemberNames::MEDIA_TYPE   => $mediaType,
                MemberNames::DISABLED     => $disabled
            )
        );
    }
protected function prepareProductMediaGalleryAttributes()
    {

        // load the attribute ID of the media gallery EAV attribute
        $mediaGalleryAttribute = $this->getEavAttributeByAttributeCode(MediaGalleryObserver::ATTRIBUTE_CODE);
        $attributeId = $mediaGalleryAttribute[MemberNames::ATTRIBUTE_ID];

        // initialize the gallery data
        $disabled = 0;
        $mediaType = 'image';
        $image = $this->getValue(ColumnKeys::IMAGE_PATH_NEW);

        // initialize and return the entity
        return $this->initializeEntity(
            array(
                MemberNames::ATTRIBUTE_ID => $attributeId,
                MemberNames::VALUE        => $image,
                MemberNames::MEDIA_TYPE   => $mediaType,
                MemberNames::DISABLED     => $disabled
            )
        );
    }
protected function prepareProductMediaGalleryAttributes ( ) { // load the attribute ID of the media gallery EAV attribute $ mediaGalleryAttribute = $ this -> getEavAttributeByAttributeCode ( MediaGalleryObserver :: ATTRIBUTE_CODE ) ; $ attributeId = $ mediaGalleryAttribute [ MemberNames :: ATTRIBUTE_ID ] ; // initialize the gallery data $ disabled = 0 ; $ mediaType = 'image' ; $ image = $ this -> getValue ( ColumnKeys :: IMAGE_PATH_NEW ) ; // initialize and return the entity return $ this -> initializeEntity ( array ( MemberNames :: ATTRIBUTE_ID => $ attributeId , MemberNames :: VALUE => $ image , MemberNames :: MEDIA_TYPE => $ mediaType , MemberNames :: DISABLED => $ disabled ) ) ; }
Prepare the product media gallery that has to be persisted.

@return array The prepared product media gallery attributes
Prepare the product media gallery that has to be persisted .