TwigItemDataField
Created for the ShopBuilder text widget.
Namespace
Ceres\Extensions
Extends
Implements
Type | Name | Description |
---|---|---|
|
The factory to render TWIG. |
|
|
This array acts as a stack (LIFO). The last element is used for data field fetches. |
Methods
public __construct($twig)
TwigItemDataField constructor.
Type |
Name |
Description |
|
The factory to render TWIG. |
public getName():string
Return the name of the extension.
public getFunctions():array
Return a list of functions to add.
public getFilters():array
Return a list of filters to add.
public setItemDataBase($itemData):string
Add an item data array into the property itemData.
Type |
Name |
Description |
|
Item data array. |
public popItemDataBase():string
Calls array_pop against the property itemData.
public getDataField($field, $filter = null, $directiveType = "text", $htmlTagType = "span", $linkType = ""):string
Return a created HTML element. The content of the element is a TWIG statement to print a field from the item data.
Type |
Name |
Description |
|
The accessor for the field in the item data. |
|
|
Add a filter in the TWIG string. |
|
|
Vue.js directive type for the element. |
|
|
HTML Tag for element. |
|
|
If set to "file", the element gets the attribute target="_black". |
public getDataFieldHtml($field, $filter = null):string
Call method getDataField with the directiveType "html".
Type |
Name |
Description |
|
The accessor for the field in the item data. |
|
|
Add a filter in the TWIG string. |
public formatAgeRestriction($age):string
Convert an age to the assigned translation string.
Type |
Name |
Description |
|
The age. |
public formatDate($date):string
Format a date string.
Type |
Name |
Description |
|
The date string. |
public getGlobals():array
Return a map of global helper objects to add.