WidgetRegistrar
in package
Class WidgetRegistrar
To register a new widget to the system create an overload for this class.
Extend the proceed-method and add the absolute path of your widget.json to the array
Table of Contents
- GAMBIO_WIDGET_ORDER = ['text', 'image', 'headline', 'button', 'code', 'separator', 'product', 'productlist', 'map']
- $widgetJsonList : array<string|int, string>
- addWidget() : void
- getWidgetsJsonFiles() : array<string|int, mixed>
- proceed() : void
- sortWidgetJsonFiles() : void
- Sorts Gambios widgets in a specific order and any other widget alphabetically
Constants
GAMBIO_WIDGET_ORDER
protected
array<string|int, string>
GAMBIO_WIDGET_ORDER
= ['text', 'image', 'headline', 'button', 'code', 'separator', 'product', 'productlist', 'map']
Properties
$widgetJsonList
protected
array<string|int, string>
$widgetJsonList
= []
Methods
addWidget()
public
addWidget(string $path) : void
Parameters
- $path : string
Return values
void —getWidgetsJsonFiles()
public
getWidgetsJsonFiles() : array<string|int, mixed>
Return values
array<string|int, mixed> —absolute paths to every available widget
proceed()
public
proceed() : void
Return values
void —sortWidgetJsonFiles()
Sorts Gambios widgets in a specific order and any other widget alphabetically
protected
sortWidgetJsonFiles() : void