BoxesWidget
extends CWidget
in package
BoxesWidget is a widget that renders a set of configurable boxes, which can represent products, product groups, or links.
Tags
Table of Contents
Constants
- TYPE_LINK = 2
- TYPE_PLACEHOLDER = 3
- TYPE_PRODUCT = 0
- TYPE_PRODUCT_GROUP = 1
Properties
- $items : array<string|int, mixed>
- $items : array<string|int, mixed>
- $limit : int
- $limit : int
- $searchBox : bool
- $searchBox : bool
- $switch : bool
- $switch : mixed
- For rendering the switch to decide which view widget is rendered
Methods
- init() : void
- Initializes the widget
- registerClientScript() : void
- Registers required script files
- run() : mixed
- Executes the widget
- getCreateSurveyBox() : array<string|int, mixed>
- Function that returns the create survey box
- getCreateSurveyGroupBox() : array<string|int, mixed>
- Function that returns the create survey group box
- getPlaceholders() : array<string|int, mixed>
- Function that returns placeholders for the boxes
Constants
TYPE_LINK
public
mixed
TYPE_LINK
= 2
TYPE_PLACEHOLDER
public
mixed
TYPE_PLACEHOLDER
= 3
TYPE_PRODUCT
public
mixed
TYPE_PRODUCT
= 0
TYPE_PRODUCT_GROUP
public
mixed
TYPE_PRODUCT_GROUP
= 1
Properties
$items
public
array<string|int, mixed>
$items
The array of items to be rendered as boxes.
$items
public
array<string|int, mixed>
$items
= []
$limit
public
int
$limit
The maximum number of boxes to display.
$limit
public
int
$limit
= 5
$searchBox
public
bool
$searchBox
Whether to include a search box in the widget.
$searchBox
public
bool
$searchBox
= \true
$switch
public
bool
$switch
Controls the rendering of the view widget.
$switch
For rendering the switch to decide which view widget is rendered
public
mixed
$switch
= \false
bool
Methods
init()
Initializes the widget
public
init() : void
registerClientScript()
Registers required script files
public
registerClientScript() : void
run()
Executes the widget
public
run() : mixed
Tags
getCreateSurveyBox()
Function that returns the create survey box
private
getCreateSurveyBox() : array<string|int, mixed>
Return values
array<string|int, mixed>getCreateSurveyGroupBox()
Function that returns the create survey group box
private
getCreateSurveyGroupBox() : array<string|int, mixed>
Return values
array<string|int, mixed>getPlaceholders()
Function that returns placeholders for the boxes
private
getPlaceholders(int $amount) : array<string|int, mixed>
Parameters
- $amount : int