LimeSurvey API - Master branch

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
const

int TYPE_PRODUCT Represents a product type.

const

int TYPE_PRODUCT_GROUP Represents a product group type.

const

int TYPE_LINK Represents a link type.

throws
CException

If an error occurs during widget execution.

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_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.

$limit

public int $limit

The maximum number of boxes to display.

public bool $searchBox

Whether to include a search box in the widget.

$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

registerClientScript()

Registers required script files

public registerClientScript() : void

run()

Executes the widget

public run() : mixed
Tags
throws
CException

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
Return values
array<string|int, mixed>

        
On this page

Search results