ProductImageContainer

Implements \ProductImageContainerInterface

Class ProductImageContainer

category

System

package

Product

subpackage

Entities

Methods

ProductImageContainer constructor.

__construct() 

Adds an additional image to the additional images array.

addAdditional(\ProductImageInterface $image) : \ProductImageContainer
Throws
\InvalidArgumentException

if the provided image type is not valid.

Arguments

$image

\ProductImageInterface

Additional product image to set in the container.

Response

\ProductImageContainer

Same instance for chained method calls.

Deletes an image from the additional images array.

delete(\FilenameStringType $imageFile) : \ProductImageContainer

Arguments

$imageFile

\FilenameStringType

Image filename.

Response

\ProductImageContainer

Same instance for chained method calls.

Returns the array of additional images as a collection.

getAdditionals() : \ProductImageCollection

Response

\ProductImageCollection

The requested additional images from container.

Returns the product primary image from container.

getPrimary() : \ProductImageInterface

Response

\ProductImageInterface

The requested primary product image from the image container.

Replaces an additional product image in the container.

replaceAdditional(\FilenameStringType $imageFile, \ProductImageInterface $image) : \ProductImageContainer

Arguments

$imageFile

\FilenameStringType

Image file name.

$image

\ProductImageInterface

Image to place.

Response

\ProductImageContainer

Same instance for chained method calls.

Sets the primary image of the image container.

setPrimary(\ProductImageInterface $image) : \ProductImageContainer

Arguments

$image

\ProductImageInterface

Primary product image to set.

Response

\ProductImageContainer

Same instance for chained method calls.

Properties

Primary image.

primaryImage : \ProductImage
var

Type(s)

\ProductImage

Additional image associative array.

additionalImages : array
var

Type(s)

array