phpDocumentor

EmptyProductImage extends ProductImage
in package

Class EmptyProductImage

Tags
category

System

subpackage

Entities

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

__construct()

ProductImage constructor.

public __construct() : mixed
Return values
mixed

getAltText()

Get Alt Text

public getAltText(LanguageCode $language) : string

Returns the alternative text of a product image if a name is already set, otherwise an empty string will be returned.

Parameters
$language : LanguageCode

The language code of the alt text to return.

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