phpDocumentor

ProductImage
in package
implements ProductImageInterface

Class ProductImage

Tags
category

System

subpackage

Entities

Interfaces, Classes and Traits

ProductImageInterface
Interface ProductImageInterface

Table of Contents

$altTexts  : array<string|int, mixed>
Alt texts of the image.
$filename  : string
Filename of the product image
$visibility  : bool
Is the product image visible?
__construct()  : mixed
ProductImage constructor.
getAltText()  : string
Get Alt Text
getFilename()  : string
Get Filename
isVisible()  : bool
Is Visible
setAltText()  : string
Set Alt Text
setVisible()  : ProductImageInterface
Set Visible

Properties

$altTexts

Alt texts of the image.

protected array<string|int, mixed> $altTexts = []

$visibility

Is the product image visible?

protected bool $visibility = rue

Methods

getAltText()

Get Alt Text

public getAltText(LanguageCode $language) : string

Returns the alternative text of a product image.

Parameters
$language : LanguageCode

The language code of the alt text to return.

Tags
throws
InvalidArgumentException

if the language code is not valid.

Return values
string

The alternative text of the product image.

getFilename()

Get Filename

public getFilename() : string

Returns the filename of the product.

Return values
string

The filename of the product.

isVisible()

Is Visible

public isVisible() : bool

Checks if the product image is set to visible or not.

Return values
bool

Is the product image visible?

setAltText()

Set Alt Text

public setAltText(StringType $text, LanguageCode $language) : string

Sets the alternative text of the product image.

Parameters
$text : StringType

The alternative text for the product image.

$language : LanguageCode

The language code of the alternative text.

Return values
string

The alternative text of the product image.

Search results