AvailabilityUi
in package
implements
AvailabilityUiInterface
Stock availability state UI properties holder.
Tags
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
$color
private
string|null
$color
= null
$description
private
Translatable|null
$description
= null
$listText
private
Translatable
$listText
$outlined
private
bool
$outlined
= false
$title
private
Translatable
$title
$tooltip
private
Translatable|null
$tooltip
= null
Methods
__construct()
Availability UI class constructor.
public
__construct(string|null $color, Translatable $title, Translatable $listText, Translatable|null $description, Translatable|null $tooltip, bool $outlined) : mixed
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
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
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
Return values
Translatable —state title
getTitle()
Returns the title of the availability state.
public
getTitle() : Translatable
Tags
Return values
Translatable —state title
getTooltip()
Returns text to display in a tooltip when inspecting the availability state.
public
getTooltip() : Translatable|null
Tags
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
Return values
bool —true
if yes, false
otherwise