Stock Availability

AvailabilityUi
in package
implements AvailabilityUiInterface

FinalYes

Stock availability state UI properties holder.

Tags
author

Jakub Jabůrek jaburek.jakub@gmail.com

Table of Contents

Interfaces

AvailabilityUiInterface
Stock availability state UI properties.

Properties

$color  : string|null
$description  : Translatable|null
$listText  : Translatable
$outlined  : bool
$title  : Translatable
$tooltip  : Translatable|null

Methods

__construct()  : mixed
Availability UI class constructor.
getColor()  : string|null
Returns the color of the availability state.
getDescription()  : Translatable|null
Returns additional description of the availability state.
getListText()  : Translatable
Returns title of the availability state that should be displayed in stock listings.
getTitle()  : Translatable
Returns the title of the availability state.
getTooltip()  : Translatable|null
Returns text to display in a tooltip when inspecting the availability state.
isOutlined()  : bool
Indicates whether the availability pill should be outlined instead of filled.

Properties

Methods

__construct()

Availability UI class constructor.

public __construct(string|null $color, Translatable $title, Translatable $listText, Translatable|null $description, Translatable|null $tooltip, bool $outlined) : mixed
APIYes
Parameters
$color : string|null

state color

$title : Translatable

state title

$listText : Translatable

state title for stock listings

$description : Translatable|null

additional description

$tooltip : Translatable|null

text to display in a tooltip

$outlined : bool

should the availability pill be outlined

getColor()

Returns the color of the availability state.

public getColor() : string|null
Tags
inheritdoc
Return values
string|null

color identifier or null if no specific color

getDescription()

Returns additional description of the availability state.

public getDescription() : Translatable|null
Tags
inheritdoc
Return values
Translatable|null

null if no description is available, content otherwise

getListText()

Returns title of the availability state that should be displayed in stock listings.

public getListText() : Translatable
Tags
inheritdoc
Return values
Translatable

state title

getTitle()

Returns the title of the availability state.

public getTitle() : Translatable
Tags
inheritdoc
Return values
Translatable

state title

getTooltip()

Returns text to display in a tooltip when inspecting the availability state.

public getTooltip() : Translatable|null
Tags
inheritdoc
Return values
Translatable|null

null if no tooltip should be generated, content otherwise

isOutlined()

Indicates whether the availability pill should be outlined instead of filled.

public isOutlined() : bool
Tags
inheritdoc
Return values
bool

true if yes, false otherwise


        
On this page

Search results