ProductlistWidget
extends AbstractWidget
in package
Class representing a product list widget
Table of Contents
- $class : TextBox
- HTML element class
- $fieldsets : array<string|int, FieldSet>
- $id : TextBox
- ID
- $itemsPerRowLg : DropdownSelectOption
- $itemsPerRowMd : DropdownSelectOption
- $itemsPerRowSm : DropdownSelectOption
- $itemsPerRowXs : DropdownSelectOption
- $jsonObject : stdClass
- $maxProducts : TextBox
- $presentation : DropdownSelectOption
- $productlist : ProductListGroupOption
- $productReadService : ProductReadService
- $random : CheckboxOption
- $static_id : string
- __construct() : mixed
- Create ProductListWidget instance
- createFromJsonObject() : ContentGeneratorInterface
- htmlContent() : string
- jsonSerialize() : mixed
- Specify data which should be serialized to JSON
- persist() : void
- previewContent() : string
- Output the HTML representation
- update() : void
- createOptionsArray() : array<string|int, mixed>
- list all the options of a widget as $option->
- createWidgetObject() : static
- getSliderItemsPerRow() : array<string|int, mixed>
- getSliderPerViewCss() : string
- initializePropertiesFromFieldset() : void
- validateJsonObject() : bool
- Used to provide specific validation criteria for passed object before creation
Properties
$class
HTML element class
protected
TextBox
$class
$fieldsets
protected
array<string|int, FieldSet>
$fieldsets
= []
$id
ID
protected
TextBox
$id
$itemsPerRowLg
protected
DropdownSelectOption
$itemsPerRowLg
$itemsPerRowMd
protected
DropdownSelectOption
$itemsPerRowMd
$itemsPerRowSm
protected
DropdownSelectOption
$itemsPerRowSm
$itemsPerRowXs
protected
DropdownSelectOption
$itemsPerRowXs
$jsonObject
protected
stdClass
$jsonObject
$maxProducts
protected
TextBox
$maxProducts
$presentation
protected
DropdownSelectOption
$presentation
$productlist
protected
ProductListGroupOption
$productlist
$productReadService
protected
ProductReadService
$productReadService
$random
protected
CheckboxOption
$random
$static_id
protected
string
$static_id
Methods
__construct()
Create ProductListWidget instance
public
__construct(string $static_id, array<string|int, FieldSet> $fieldsets, stdClass $jsonObject) : mixed
Parameters
- $static_id : string
-
Static ID
- $fieldsets : array<string|int, FieldSet>
-
Fieldsets
- $jsonObject : stdClass
-
JSON
Tags
Return values
mixed —createFromJsonObject()
public
static createFromJsonObject(stdClass $jsonObject) : ContentGeneratorInterface
Parameters
- $jsonObject : stdClass
Tags
Return values
ContentGeneratorInterface —htmlContent()
public
htmlContent(Language|null $currentLanguage) : string
Parameters
- $currentLanguage : Language|null
Return values
string —jsonSerialize()
Specify data which should be serialized to JSON
public
jsonSerialize() : mixed
Tags
Return values
mixed —data which can be serialized by json_encode, which is a value of any type other than a resource.
persist()
public
persist() : void
Return values
void —previewContent()
Output the HTML representation
public
previewContent(Language|null $currentLanguage) : string
Parameters
- $currentLanguage : Language|null
Tags
Return values
string —update()
public
update() : void
Return values
void —createOptionsArray()
list all the options of a widget as $option->
protected
static createOptionsArray(stdClass $widget) : array<string|int, mixed>
Parameters
- $widget : stdClass
Return values
array<string|int, mixed> —createWidgetObject()
protected
static createWidgetObject(stdClass $jsonObject[, array<string|int, mixed> $fieldSets = [] ]) : static
Parameters
- $jsonObject : stdClass
- $fieldSets : array<string|int, mixed> = []
Tags
Return values
static —getSliderItemsPerRow()
protected
getSliderItemsPerRow() : array<string|int, mixed>
Return values
array<string|int, mixed> —getSliderPerViewCss()
protected
getSliderPerViewCss(array<string|int, mixed> $id[, string $tagType = 'style' ]) : string
Parameters
- $id : array<string|int, mixed>
- $tagType : string = 'style'
Return values
string —initializePropertiesFromFieldset()
protected
initializePropertiesFromFieldset() : void
Tags
Return values
void —validateJsonObject()
Used to provide specific validation criteria for passed object before creation
protected
static validateJsonObject(stdClass $jsonObject) : bool
Parameters
- $jsonObject : stdClass