WidgetDataFactory
Methods
public static make($identifier):WidgetDataFactory
Create a new widget factory instance.
Type |
Name |
Description |
|
Unique identifier of the widget. |
public withLabel($label):Factories
Set a label for this widget. Will be translated.
Type |
Name |
Description |
|
Label of the widget to be displayed in the shop builder |
public withPreviewImageUrl($previewImageUrl):Factories
Set the url of a preview image for the widget.
Type |
Name |
Description |
|
public withType($type):Factories
Set the type of the widget.
Type |
Name |
Description |
|
Type of the widget |
public withCategory($category):Factories
Add a category for the widget. A widget might be assigned to multiple categories.
Type |
Name |
Description |
|
public withPosition($position):Factories
Set the position of the widget.
Type |
Name |
Description |
|
Position of the widget |
public withMaxPerPage($maxPerPage):Factories
Limit the amount of times a widget can be placed on a content.
Type |
Name |
Description |
|
Maximum allowed amount of instances of the widget on a content |
public withAllowedNestingTypes($allowedTypes):Factories
Limits the widget types that you can drop into this widget.
Type |
Name |
Description |
|
public withDeprecated():Factories
Set the widget as deprecated.
public toArray():array
Get widget data.