ProductListItem

Class ProductListItem

category

System

package

Product

subpackage

Entities

Methods

ProductListItem constructor.

__construct(\ProductRepositoryInterface $productRepo, \IdType $productId, \BoolType $isActive, \StringType $name, \StringType $urlKeywords, \StringType $image, \StringType $imageAltText) 

Arguments

$productRepo

\ProductRepositoryInterface

Product Repository.

$productId

\IdType

Product ID.

$isActive

\BoolType

Is the product active?

$name

\StringType

Product name.

$urlKeywords

\StringType

URL keywords.

$image

\StringType

Product image.

$imageAltText

\StringType

Product image alternative text.

Returns the image.

getImage() : string

Response

string

Returns the alternative image text.

getImageAltText() : string

Response

string

Returns the name of the product.

getName() : string

Response

string

Returns the product ID.

getProductId() : integer

Response

integer

Returns the product object.

getProductObject() : \ProductListItem
throws

if the product ID is not valid.

Response

\ProductListItem

Same instance for chained method calls.

Returns the URL keywords.

getUrlKeywords() : string

Response

string

Checks if product is active or not.

isActive() : boolean

Response

boolean

Properties

Product repository.

productRepo : \ProductRepositoryInterface

Product ID.

productId : integer
var

Type(s)

integer

Is product active?

active : boolean
var

Type(s)

boolean

Product name.

name : string
var

Type(s)

string

URL keywords.

urlKeywords : string
var

Type(s)

string

Image.

image : string
var

Type(s)

string

Image alternative text.

imageAltText : string
var

Type(s)

string