Plentymarkets interface documentation

ShopBuilder

Contracts

ContentLinkRepositoryContract

Get, create, delete, and update links between shopBuilder contents and layout containers depending on plugin sets and languages.

Namespace

Plenty\Modules\ShopBuilder\Contracts

Methods

Get all content links for a plugin set.

Parameters

Name

Type

Description

$pluginSetId

int

The ID of the plugin set to get content links for.

Return type: ContentLink

Get a single connection between a content and a layout container.

Parameters

Name

Type

Description

$contentLinkId

int

The ID of the content link to get.

Return type: ContentLink

Create a link between a content and a layout container for a specified plugin set and a language.

Parameters

Name

Type

Description

$data

Content link data to create instance with.

Return type: ContentLink

Update a link between a content and a layout container.

Parameters

Name

Type

Description

$contentLinkId

int

ID of the content link.

$data

array

Data to assign to the content link.

Unlink a content from a layout container. The content itself will remain.

Parameters

Name

Type

Description

$contentLinkId

int

The ID of the content link to remove.

public getContentLinksForContainer($containerName, $pluginSetId = null, $lang = null, $contentType = null, $filterResults = true):void

Get all content links for a specific layout container.

Parameters

Name

Type

Description

$containerName

string

The name of the layout container for which to get content links.

$pluginSetId

int

An ID of a plugin set for which to get content links. Active plugin set will be used by default.

$lang

string

The language for which to get content links. Current language will be gotten from session if not defined.

$contentType

string

Type of the content to get.

$filterResults

bool

ContentPreset

Contract for content presets. Presets can provide a predefined set of widgets when creating new contents in the shopBuilder.

Namespace

Plenty\Modules\ShopBuilder\Contracts

Methods
public getWidgets():void

Get the widget configurations of the presets to be assigned to the created content.

ContentRepositoryContract

Get, create, delete, und update shopBuilder contents.

Namespace

Plenty\Modules\ShopBuilder\Contracts

Methods
public getContents():array

Get all contents with all their widget data.

public searchContents($itemsPerPage = 20, $page = 1, $params = []):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult

Search for contents. Search params are queried conjunctively while values for each params are queried disjunctively:

Parameters

Name

Type

Description

$itemsPerPage

int

Maximum number of items to be returned on each page

$page

int

Current page

$params

array

Search parameters

public getContent($contentId, $pluginSetId, $frontendLanguage = null, $versionId = ""):Plenty\Modules\ShopBuilder\Models\Content
Return type: Content

Get a single content.

Parameters

Name

Type

Description

$contentId

int

ID of the content to get information for.

$pluginSetId

int

The plugin set ID to be used for rendering widgets.

$frontendLanguage

string

The language to be used for rendering the widgets.

$versionId

string

The version of the content.

public listContentVersions($contentId, $itemsPerPage = 20, $versionIdMarker = ""):void

Get a list of versions of the specified content.

Parameters

Name

Type

Description

$contentId

int

ID of the content to get versions for.

$itemsPerPage

int

Number of versions to be displayed at a page.

$versionIdMarker

string

ID of a version to get subsequent versions from.

public restoreContentVersion($contentId, $versionId, $pluginSetId, $frontendLanguage = null):void

Restore a content to a specific version.

Parameters

Name

Type

Description

$contentId

int

ID of the content to restore.

$versionId

string

ID of the version to restore the content to.

$pluginSetId

int

$frontendLanguage

public createContent($pluginSetId, $data, $frontendLanguage = null):Plenty\Modules\ShopBuilder\Models\Content
Return type: Content

Create new content. New content will not be linked to any layout container.

Parameters

Name

Type

Description

$pluginSetId

int

The plugin set to be used to render the content. The raw content data do not depend on a plugin set.

$data

The raw content data.

$frontendLanguage

string

The language to be used for rendering the widgets.

public updateContent($pluginSetId, $contentId, $data, $frontendLanguage = null):Plenty\Modules\ShopBuilder\Models\Content
Return type: Content

Update content. Metadata, such as the user defined name of the content, will be stored separately to the data of the widgets.

Parameters

Name

Type

Description

$pluginSetId

int

The plugin set to be used to render the content. The raw content data do not depend on a plugin set.

$contentId

int

The ID of the content to be updated.

$data

The raw data of the content.

$frontendLanguage

string

The language to be used for rendering the widgets.

public deleteContent($pluginSetId, $contentId):void

Delete content. Any connections to layout containers will be removed, too.

Parameters

Name

Type

Description

$pluginSetId

int

The plugin set to be used to render the content. The raw content data do not depend on a plugin set.

$contentId

int

The ID of the content to be deleted.

public duplicateContent($contentId, $targetPluginSetId, $language, $containerName, $contentName):Plenty\Modules\ShopBuilder\Models\Content
Return type: Content

Duplicate a content and its link.

Parameters

Name

Type

Description

$contentId

int

The ID of the content to be duplicated.

$targetPluginSetId

int

ID of the plugin set to link the duplicated content to.

$language

string

Language to link the duplicated content to.

$containerName

string

Name of the layout container to link the duplicated content to.

$contentName

string

Name of the duplicated content.

public rebuildContents($containerName = null, $pluginSetId):int

Rebuild all contents linked to the current plugin set.

Parameters

Name

Type

Description

$containerName

string

Name of the layout container to rebuild contents for.

$pluginSetId

int

ID of the plugin set to rebuild contents for.

ContentWidgetRepositoryContract

Register shopBuilder widgets.

Namespace

Plenty\Modules\ShopBuilder\Contracts

Methods
public registerWidget($widgetClass):void

Register a widget to be available in the shopBuilder.

Parameters

Name

Type

Description

$widgetClass

string

Widget class to be registered to the shopBuilder. Should implement the Widget interface.

public overrideWidget($widgetIdentifier, $overrideWidget):void

Override a widget class to extend data or settings of the widget.

Parameters

Name

Type

Description

$widgetIdentifier

string

The identifier of the original widget to override.

$overrideWidget

string

The class of the new class to get information of the widget from.

DynamicWidget

Contract for widgets with dynamic settings

Namespace

Plenty\Modules\ShopBuilder\Contracts

Methods
public getData():array

Get base data of the widget. Each widget should define at least an identifier and a label to be displayed in the builder. In total the following information can be provided: <ul> <li>identifier: A unique identifier of the widget. This is used to identify widgets when loading widgets of a content in the builder.</li> <li>label: The label of the widget to be displayed in the list of available widgets in the builder.</li> <li>previewImageURL: The url of the preview image to be displayed in the list of available widgets in the builder.</li> <li>type: The type of the widget. This is used to restrict possible locations of the widgets using the allowedNestingTypes.</li> <li>categories: A list of category keys defined in the list of categories to be displayed in the list of available widgets. If no correspondig category exists, the widget will be located in a generic category.</li> <li>position: The position of the widget in the list of available widgets</li> <li>maxPerPage: Restrict the amount of times the widget can be placed on a single content.</li> <li>allowedNestingTypes: A list of widget types that are allowed to be placed in child dropzones of the widget.</li> <li>deprecated: set to true to hide the widget in the list of available widgets. Existing deprecated widgets can still be edited but not added anymore.</li> </ul>

public getSettings():array

Get the settings of the widgets. Settings are displayed in a terra-form when the widget is selected in the builder.

public getPreview($widgetSettings = [], $children = []):string

Render the template of the widget twice to get the final markup to be displayed in the preview of the builder.

Parameters

Name

Type

Description

$widgetSettings

array

$children

array

public render($widgetSettings = [], $children = []):string

Render the template of the widget.

Parameters

Name

Type

Description

$widgetSettings

array

$children

array

GlobalSettingsHandler

Contract for classes handling global settings for the ShopBuilder. Handler classes can be registered in the shopBuilder.json of a plugin.

Namespace

Plenty\Modules\ShopBuilder\Contracts

Methods
public readSettings():void

Read values of global settings.

public writeSettings($values):void

Store values of global settings.

Parameters

Name

Type

Description

$values

Setting values for the global settings defined by this handler.

Widget

Contract for content widgets

Namespace

Plenty\Modules\ShopBuilder\Contracts

Methods
public getPreview($widgetSettings = [], $children = []):string

Render the template of the widget twice to get the final markup to be displayed in the preview of the builder.

Parameters

Name

Type

Description

$widgetSettings

array

$children

array

public render($widgetSettings = [], $children = []):string

Render the template of the widget.

Parameters

Name

Type

Description

$widgetSettings

array

$children

array

Factories

WidgetSettingsFactory

Factory to generate widget settings

Namespace

Plenty\Modules\ShopBuilder\Factories

Methods
public static inherit($parentWidgetClass):Plenty\Modules\ContentBuilder\Factories\WidgetSettingsFactory
Return type: WidgetSettingsFactory

Create a new factory instance and initialize values from given widget class.

Parameters

Name

Type

Description

$parentWidgetClass

string

public static create($data = []):Plenty\Modules\ContentBuilder\Factories\WidgetSettingsFactory
Return type: WidgetSettingsFactory

Create a new factory instance with initial values.

Parameters

Name

Type

Description

$data

array

public createSetting($key, $settingsFactory = &quot;&quot;, $args = []):void

Create a generic widget settings entry.

Parameters

Name

Type

Description

$key

string

The key of the new settings entry. If key already exists, previous entry will be overridden.

$settingsFactory

string

Class name of the settings factory to add an instance of

$args

array

Arguments to be passed to the factory constructor method

public toArray():array

Generate settings data from all registered factories

public withPointer($key):Plenty\Modules\ContentBuilder\Factories\WidgetSettingsFactory
Return type: WidgetSettingsFactory

Set a settings key to insert new settings after.

Parameters

Name

Type

Description

$key

string

public addSetting($key, $setting):void

Insert a new settings factory at the current pointer.

Parameters

Name

Type

Description

$key

string

$setting

Helper

MappableSettingsHandler

Helper to map global configurations to plugin configs.

Namespace

Plenty\Modules\ShopBuilder\Helper

ShopBuilderRequest

Get information about the current request made from the shop builder preview.

Namespace

Plenty\Modules\ShopBuilder\Helper

Methods
public isShopBuilder():bool

Determine if the current request is made from the shop builder preview or while rendering a widget via REST.

public getPreviewContentType():string

Get the type of the previewed shop builder content.

public getPreviewUri():void

Get uri of the current preview. This might be used when rendering widgets via REST to know the context where the widget will be placed into after rendering.

public getMainContentType():string

Get the content type of the currently displayed main content.

public setMainContentType($mainContentType):void

Set the type of the currently displayed item content This will be used to determine the corresponding header/footer contents which are linked to a specific type.

Parameters

Name

Type

Description

$mainContentType

string

Possible values: <ul> <li>content</li> <li>checkout</li> <li>myaccount</li> <li>singleitem</li> <li>categoryitem</li> <li>itemsearch</li> <li>itemset</li> </ul>

public getMainContainerName():string

Get the container name where the main content will be loaded into.

public setMainContainerName($mainContainerName):void

Set the container name where the main content will be loaded into.

Parameters

Name

Type

Description

$mainContainerName

string

Name of the layout container.

public setMainCategory($mainCategory):void

Set the id of the currently displayed category.

Parameters

Name

Type

Description

$mainCategory

Id of the currently displayed category.

Models

Content

Content created by the shop builder. May be linked to layout containers.

Namespace

Plenty\Modules\ShopBuilder\Models

Properties
Name Type Description

id

int

The ID of the content

dataProviderName

string

The name of the data provider

createdAt

The date when the content was created

updatedAt

The date when the content was last updated

type

string

The type of the content

widgets

The configured widgets of the content. This attribute is deprecated. Use $dropzones instead.

dropzones

array

Dropzones of the content

link

ContentLink

Methods
public toArray()

Returns this model as an array.

Links a content from the shop builder to a layout container of the frontend plugin.

Namespace

Plenty\Modules\ShopBuilder\Models

Properties
Name Type Description

id

int

The ID of the content link

contentId

int

The ID of the content

containerName

string

The name of the container

pluginSetId

int

The Id of the plugin set

language

string

The language where the content is linked to.

active

bool

Indicates if the link is active and the content should be visible for the frontend.

relatedContentType

string

The content type the content is linked to

relatedContainerName

string

The container name the content is linked to

inherit

bool

Indicates if this content should be inherited to child contents.

invalid

bool

Indicate if the content is invalid and should be regenerated on next request.

createdAt

The date when the content was created

updatedAt

The date when the content was last updated

content

Content

Methods
public toArray()

Returns this model as an array.

ContentPage

A content page provided by a frontend plugin.

Namespace

Plenty\Modules\ShopBuilder\Models

Properties
Name Type Description

identifier

string

The identifier of the content page

caption

string

Translation key to read the caption from

dropzones

array

Available dropzones of this page to put contents into.

Methods
public toArray()

Returns this model as an array.

ContentPageDropzone

Layout container of a content page where to display link contents generated by the shop builder.

Namespace

Plenty\Modules\ShopBuilder\Models

Properties
Name Type Description

container

string

The container where dropped contents should be linked to.

type

string

The type of contents which can be linked to this dropzone.

Methods
public toArray()

Returns this model as an array.

ContentWidget

Content widget provided by a frontend plugin

Namespace

Plenty\Modules\ShopBuilder\Models

Properties
Name Type Description

identifier

string

The identifier of the content widget

widgetClass

string

The class of the content widget

label

string

The label of the content widget

tooltip

string

The tooltip of the content widget

previewImageURL

string

The preview image the content widget

type

string

The type of the widget

maxPerPage

int

Maximum occurrences per content of the widget

categories

array

List of categories

allowedNestingTypes

array

Allowed types to be nested inside this widget

settings

The settings of the content widget

Methods
public toArray()

Returns this model as an array.

ContentWidgetPreview

The rendered preview of a content widget

Namespace

Plenty\Modules\ShopBuilder\Models

Properties
Name Type Description

identifier

string

content

string

Methods
public toArray()

Returns this model as an array.

Providers

DataFieldProvider

Base class for data field providers.

Namespace

Plenty\Modules\ShopBuilder\Providers

Methods
public register():void

Register data fields and child providers.

public addField($identifier, $label, $expression, $isBlockElement = false, $isDeprecated = false):void

Register a new data field.

Parameters

Name

Type

Description

$identifier

string

Unique identifier of the data field

$label

string

The label of the field

$expression

string

The twig expression to be inserted by this field

$isBlockElement

bool

Set to true to handle the element as a block element

$isDeprecated

bool

Deprecated flag for fields

public addChildProvider($label, $childProviderClass, $params = [], $identifier = &quot;&quot;):void

Register a nested provider containing a list of child data fields.

Parameters

Name

Type

Description

$label

string

The label of the group

$childProviderClass

string

The class name of the nested data fields provider.

$params

array

Additional parameters to be passed to provider constructor method.

$identifier

string

Data field identifier, class name will be used if empty

public addSearchKeywords($identifier, $keywords = []):void

Assign keywords to a field to be respected during search.

Parameters

Name

Type

Description

$identifier

string

The identifier of the field to assign keywords to.

$keywords

array

A list of keywords. Each keyword may contain a translation key. A single keyword could be a comma separated list of words.

Factories

Settings

BaseSettingFactory

Common factory to generate properties of a widget setting definition.

Namespace

Plenty\Modules\ShopBuilder\Factories\Settings

Properties
Name Type Description

data

Methods
public static create($data = []):void
Parameters

Name

Type

Description

$data

public withType($type):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the type of the setting.

Parameters

Name

Type

Description

$type

string

public withDefaultValue($defaultValue):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the default value for the setting.

Parameters

Name

Type

Description

$defaultValue

The default value

public withCondition($condition):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a condition if the setting should be visible or not.

Parameters

Name

Type

Description

$condition

string

Condition if the related form element should be visible or not.

public withName($name):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the name of the setting.

Parameters

Name

Type

Description

$name

string

The label of the setting

public withOption($key, $value):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set an option for the setting.

Parameters

Name

Type

Description

$key

string

The option key

$value

The option value

public withTooltip($tooltip):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a tooltip text for this input

Parameters

Name

Type

Description

$tooltip

string

An additional description of the setting

public withTooltipPlacement($tooltipPlacement):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Define the tooltip placement. Possible values are 'bottom', 'top', 'left' or 'right', default is 'top'

Parameters

Name

Type

Description

$tooltipPlacement

string

public withList($min, $max):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Determines whether the declaration is used to render a list of the specified form field.

Parameters

Name

Type

Description

$min

int

Minimum number of entries.

$max

int

Maximum number of entries. If not set or smaller than 0, unlimited entries might be added by the user.

public toArray():array

Get all data as array

CategorySettingFactory

Factory to define a category picker in the widget settings.

Namespace

Plenty\Modules\ShopBuilder\Factories\Settings

Methods
public withDisplayResetButton($displayResetButton):Plenty\Modules\ContentBuilder\Factories\Settings\CategorySettingFactory
Return type: CategorySettingFactory

Display or hide a button to reset the current selection.

Parameters

Name

Type

Description

$displayResetButton

bool

public withDisplaySearch($displaySearch):Plenty\Modules\ContentBuilder\Factories\Settings\CategorySettingFactory
Return type: CategorySettingFactory

Display or hide an input to search for categories with.

Parameters

Name

Type

Description

$displaySearch

bool

public withShowFullSelectionPath($showFullSelectionPath):Plenty\Modules\ContentBuilder\Factories\Settings\CategorySettingFactory
Return type: CategorySettingFactory
Parameters

Name

Type

Description

$showFullSelectionPath

bool

public static create($data = []):void
Parameters

Name

Type

Description

$data

public withType($type):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the type of the setting.

Parameters

Name

Type

Description

$type

string

public withDefaultValue($defaultValue):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the default value for the setting.

Parameters

Name

Type

Description

$defaultValue

The default value

public withCondition($condition):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a condition if the setting should be visible or not.

Parameters

Name

Type

Description

$condition

string

Condition if the related form element should be visible or not.

public withName($name):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the name of the setting.

Parameters

Name

Type

Description

$name

string

The label of the setting

public withOption($key, $value):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set an option for the setting.

Parameters

Name

Type

Description

$key

string

The option key

$value

The option value

public withTooltip($tooltip):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a tooltip text for this input

Parameters

Name

Type

Description

$tooltip

string

An additional description of the setting

public withTooltipPlacement($tooltipPlacement):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Define the tooltip placement. Possible values are 'bottom', 'top', 'left' or 'right', default is 'top'

Parameters

Name

Type

Description

$tooltipPlacement

string

public withList($min, $max):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Determines whether the declaration is used to render a list of the specified form field.

Parameters

Name

Type

Description

$min

int

Minimum number of entries.

$max

int

Maximum number of entries. If not set or smaller than 0, unlimited entries might be added by the user.

public toArray():array

Get all data as array

CheckboxGroupSettingFactory

Factory to define a checkbox group in the widget settings.

Namespace

Plenty\Modules\ShopBuilder\Factories\Settings

Methods
public withCollapsed($collapsed):Plenty\Modules\ContentBuilder\Factories\Settings\CheckboxGroupSettingFactory
Return type: CheckboxGroupSettingFactory

Collapse or expand the group by default. The group can be toggled by the user.

Parameters

Name

Type

Description

$collapsed

bool

public withCheckboxValues($checkboxValues):Plenty\Modules\ContentBuilder\Factories\Settings\CheckboxGroupSettingFactory
Return type: CheckboxGroupSettingFactory

Set available checkboxes of the group.

Parameters

Name

Type

Description

$checkboxValues

array

public withDefaultValue($defaultValue):Plenty\Modules\ContentBuilder\Factories\Settings\CheckboxGroupSettingFactory
Return type: CheckboxGroupSettingFactory

Set the default value of the group. This should be an array of values.

Parameters

Name

Type

Description

$defaultValue

array

public static create($data = []):void
Parameters

Name

Type

Description

$data

public withType($type):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the type of the setting.

Parameters

Name

Type

Description

$type

string

public withCondition($condition):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a condition if the setting should be visible or not.

Parameters

Name

Type

Description

$condition

string

Condition if the related form element should be visible or not.

public withName($name):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the name of the setting.

Parameters

Name

Type

Description

$name

string

The label of the setting

public withOption($key, $value):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set an option for the setting.

Parameters

Name

Type

Description

$key

string

The option key

$value

The option value

public withTooltip($tooltip):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a tooltip text for this input

Parameters

Name

Type

Description

$tooltip

string

An additional description of the setting

public withTooltipPlacement($tooltipPlacement):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Define the tooltip placement. Possible values are 'bottom', 'top', 'left' or 'right', default is 'top'

Parameters

Name

Type

Description

$tooltipPlacement

string

public withList($min, $max):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Determines whether the declaration is used to render a list of the specified form field.

Parameters

Name

Type

Description

$min

int

Minimum number of entries.

$max

int

Maximum number of entries. If not set or smaller than 0, unlimited entries might be added by the user.

public toArray():array

Get all data as array

CheckboxSettingFactory

Factory to define a checkbox in the widget settings.

Namespace

Plenty\Modules\ShopBuilder\Factories\Settings

Methods
public withIcon($icon):Plenty\Modules\ContentBuilder\Factories\Settings\CheckboxSettingFactory
Return type: CheckboxSettingFactory

Set the icon of the checkbox.

Parameters

Name

Type

Description

$icon

string

public static create($data = []):void
Parameters

Name

Type

Description

$data

public withType($type):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the type of the setting.

Parameters

Name

Type

Description

$type

string

public withDefaultValue($defaultValue):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the default value for the setting.

Parameters

Name

Type

Description

$defaultValue

The default value

public withCondition($condition):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a condition if the setting should be visible or not.

Parameters

Name

Type

Description

$condition

string

Condition if the related form element should be visible or not.

public withName($name):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the name of the setting.

Parameters

Name

Type

Description

$name

string

The label of the setting

public withOption($key, $value):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set an option for the setting.

Parameters

Name

Type

Description

$key

string

The option key

$value

The option value

public withTooltip($tooltip):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a tooltip text for this input

Parameters

Name

Type

Description

$tooltip

string

An additional description of the setting

public withTooltipPlacement($tooltipPlacement):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Define the tooltip placement. Possible values are 'bottom', 'top', 'left' or 'right', default is 'top'

Parameters

Name

Type

Description

$tooltipPlacement

string

public withList($min, $max):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Determines whether the declaration is used to render a list of the specified form field.

Parameters

Name

Type

Description

$min

int

Minimum number of entries.

$max

int

Maximum number of entries. If not set or smaller than 0, unlimited entries might be added by the user.

public toArray():array

Get all data as array

ContainerSettingFactory

Factory to define a container for nested settings.

Namespace

Plenty\Modules\ShopBuilder\Factories\Settings

Methods
public static create($data = []):Plenty\Modules\ContentBuilder\Factories\Settings\ContainerSettingFactory
Return type: ContainerSettingFactory

Create a new factory instance with initial value.

Parameters

Name

Type

Description

$data

array

public toArray():array

Get all children as a native array

public withType($type):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the type of the setting.

Parameters

Name

Type

Description

$type

string

public withDefaultValue($defaultValue):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the default value for the setting.

Parameters

Name

Type

Description

$defaultValue

The default value

public withCondition($condition):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a condition if the setting should be visible or not.

Parameters

Name

Type

Description

$condition

string

Condition if the related form element should be visible or not.

public withName($name):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the name of the setting.

Parameters

Name

Type

Description

$name

string

The label of the setting

public withOption($key, $value):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set an option for the setting.

Parameters

Name

Type

Description

$key

string

The option key

$value

The option value

public withTooltip($tooltip):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a tooltip text for this input

Parameters

Name

Type

Description

$tooltip

string

An additional description of the setting

public withTooltipPlacement($tooltipPlacement):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Define the tooltip placement. Possible values are 'bottom', 'top', 'left' or 'right', default is 'top'

Parameters

Name

Type

Description

$tooltipPlacement

string

public withList($min, $max):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Determines whether the declaration is used to render a list of the specified form field.

Parameters

Name

Type

Description

$min

int

Minimum number of entries.

$max

int

Maximum number of entries. If not set or smaller than 0, unlimited entries might be added by the user.

DateSettingFactory

Factory to define a date picker in the widget settings.

Namespace

Plenty\Modules\ShopBuilder\Factories\Settings

Methods
public withCalendarTop($isCalendarTop):Plenty\Modules\ContentBuilder\Factories\Settings\DateSettingFactory
Return type: DateSettingFactory

Display the popup containing the calendar above or below the input field.

Parameters

Name

Type

Description

$isCalendarTop

bool

public withDisplayDateFormat($format):Plenty\Modules\ContentBuilder\Factories\Settings\DateSettingFactory
Return type: DateSettingFactory

Set the date format to apply to the input field.

Parameters

Name

Type

Description

$format

string

public static create($data = []):void
Parameters

Name

Type

Description

$data

public withType($type):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the type of the setting.

Parameters

Name

Type

Description

$type

string

public withDefaultValue($defaultValue):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the default value for the setting.

Parameters

Name

Type

Description

$defaultValue

The default value

public withCondition($condition):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a condition if the setting should be visible or not.

Parameters

Name

Type

Description

$condition

string

Condition if the related form element should be visible or not.

public withName($name):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the name of the setting.

Parameters

Name

Type

Description

$name

string

The label of the setting

public withOption($key, $value):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set an option for the setting.

Parameters

Name

Type

Description

$key

string

The option key

$value

The option value

public withTooltip($tooltip):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a tooltip text for this input

Parameters

Name

Type

Description

$tooltip

string

An additional description of the setting

public withTooltipPlacement($tooltipPlacement):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Define the tooltip placement. Possible values are 'bottom', 'top', 'left' or 'right', default is 'top'

Parameters

Name

Type

Description

$tooltipPlacement

string

public withList($min, $max):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Determines whether the declaration is used to render a list of the specified form field.

Parameters

Name

Type

Description

$min

int

Minimum number of entries.

$max

int

Maximum number of entries. If not set or smaller than 0, unlimited entries might be added by the user.

public toArray():array

Get all data as array

DoubleSettingFactory

Factory to define a number input in the widget settings.

Namespace

Plenty\Modules\ShopBuilder\Factories\Settings

Methods
public withPriceInput($isPriceInput):Plenty\Modules\ContentBuilder\Factories\Settings\DoubleSettingFactory
Return type: DoubleSettingFactory

Define if input expects a monetary value.

Parameters

Name

Type

Description

$isPriceInput

bool

public withDecimalCount($decimalCount):Plenty\Modules\ContentBuilder\Factories\Settings\DoubleSettingFactory
Return type: DoubleSettingFactory

Set the number of decimal places for the input.

Parameters

Name

Type

Description

$decimalCount

int

public static create($data = []):void
Parameters

Name

Type

Description

$data

public withType($type):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the type of the setting.

Parameters

Name

Type

Description

$type

string

public withDefaultValue($defaultValue):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the default value for the setting.

Parameters

Name

Type

Description

$defaultValue

The default value

public withCondition($condition):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a condition if the setting should be visible or not.

Parameters

Name

Type

Description

$condition

string

Condition if the related form element should be visible or not.

public withName($name):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the name of the setting.

Parameters

Name

Type

Description

$name

string

The label of the setting

public withOption($key, $value):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set an option for the setting.

Parameters

Name

Type

Description

$key

string

The option key

$value

The option value

public withTooltip($tooltip):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a tooltip text for this input

Parameters

Name

Type

Description

$tooltip

string

An additional description of the setting

public withTooltipPlacement($tooltipPlacement):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Define the tooltip placement. Possible values are 'bottom', 'top', 'left' or 'right', default is 'top'

Parameters

Name

Type

Description

$tooltipPlacement

string

public withList($min, $max):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Determines whether the declaration is used to render a list of the specified form field.

Parameters

Name

Type

Description

$min

int

Minimum number of entries.

$max

int

Maximum number of entries. If not set or smaller than 0, unlimited entries might be added by the user.

public toArray():array

Get all data as array

FileSettingFactory

Factory to define a file input in the widget settings.

Namespace

Plenty\Modules\ShopBuilder\Factories\Settings

Methods
public withShowPreview($showPreview):Plenty\Modules\ContentBuilder\Factories\Settings\FileSettingFactory
Return type: FileSettingFactory

Display the preview of the selected file.

Parameters

Name

Type

Description

$showPreview

bool

public withAllowedExtensions($allowedExtensions):Plenty\Modules\ContentBuilder\Factories\Settings\FileSettingFactory
Return type: FileSettingFactory

Restrict allowed file extensions.

Parameters

Name

Type

Description

$allowedExtensions

array

public withFoldersAllowed($foldersAllowed):Plenty\Modules\ContentBuilder\Factories\Settings\FileSettingFactory
Return type: FileSettingFactory

Set to true if the user should be allowed to create new folders.

Parameters

Name

Type

Description

$foldersAllowed

bool

public static create($data = []):void
Parameters

Name

Type

Description

$data

public withType($type):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the type of the setting.

Parameters

Name

Type

Description

$type

string

public withDefaultValue($defaultValue):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the default value for the setting.

Parameters

Name

Type

Description

$defaultValue

The default value

public withCondition($condition):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a condition if the setting should be visible or not.

Parameters

Name

Type

Description

$condition

string

Condition if the related form element should be visible or not.

public withName($name):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the name of the setting.

Parameters

Name

Type

Description

$name

string

The label of the setting

public withOption($key, $value):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set an option for the setting.

Parameters

Name

Type

Description

$key

string

The option key

$value

The option value

public withTooltip($tooltip):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a tooltip text for this input

Parameters

Name

Type

Description

$tooltip

string

An additional description of the setting

public withTooltipPlacement($tooltipPlacement):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Define the tooltip placement. Possible values are 'bottom', 'top', 'left' or 'right', default is 'top'

Parameters

Name

Type

Description

$tooltipPlacement

string

public withList($min, $max):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Determines whether the declaration is used to render a list of the specified form field.

Parameters

Name

Type

Description

$min

int

Minimum number of entries.

$max

int

Maximum number of entries. If not set or smaller than 0, unlimited entries might be added by the user.

public toArray():array

Get all data as array

RadioGroupSettingFactory

Factory to define a group of radio buttons in the widget settings.

Namespace

Plenty\Modules\ShopBuilder\Factories\Settings

Methods
public withRadioValues($radioValues):Plenty\Modules\ContentBuilder\Factories\Settings\RadioGroupSettingFactory
Return type: RadioGroupSettingFactory

Set the available radio buttons in this group.

Parameters

Name

Type

Description

$radioValues

array

public static create($data = []):void
Parameters

Name

Type

Description

$data

public withType($type):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the type of the setting.

Parameters

Name

Type

Description

$type

string

public withDefaultValue($defaultValue):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the default value for the setting.

Parameters

Name

Type

Description

$defaultValue

The default value

public withCondition($condition):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a condition if the setting should be visible or not.

Parameters

Name

Type

Description

$condition

string

Condition if the related form element should be visible or not.

public withName($name):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the name of the setting.

Parameters

Name

Type

Description

$name

string

The label of the setting

public withOption($key, $value):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set an option for the setting.

Parameters

Name

Type

Description

$key

string

The option key

$value

The option value

public withTooltip($tooltip):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a tooltip text for this input

Parameters

Name

Type

Description

$tooltip

string

An additional description of the setting

public withTooltipPlacement($tooltipPlacement):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Define the tooltip placement. Possible values are 'bottom', 'top', 'left' or 'right', default is 'top'

Parameters

Name

Type

Description

$tooltipPlacement

string

public withList($min, $max):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Determines whether the declaration is used to render a list of the specified form field.

Parameters

Name

Type

Description

$min

int

Minimum number of entries.

$max

int

Maximum number of entries. If not set or smaller than 0, unlimited entries might be added by the user.

public toArray():array

Get all data as array

SelectSettingFactory

Factory to define a selection input in the widget settings.

Namespace

Plenty\Modules\ShopBuilder\Factories\Settings

Methods
public withOpenOnTop($openOnTop):Plenty\Modules\ContentBuilder\Factories\Settings\SelectSettingFactory
Return type: SelectSettingFactory

Set to true to open selection values above the input field.

Parameters

Name

Type

Description

$openOnTop

bool

public withListBoxValues($listBoxValues):Plenty\Modules\ContentBuilder\Factories\Settings\SelectSettingFactory
Return type: SelectSettingFactory

Set available selection values.

Parameters

Name

Type

Description

$listBoxValues

array

public static create($data = []):void
Parameters

Name

Type

Description

$data

public withType($type):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the type of the setting.

Parameters

Name

Type

Description

$type

string

public withDefaultValue($defaultValue):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the default value for the setting.

Parameters

Name

Type

Description

$defaultValue

The default value

public withCondition($condition):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a condition if the setting should be visible or not.

Parameters

Name

Type

Description

$condition

string

Condition if the related form element should be visible or not.

public withName($name):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the name of the setting.

Parameters

Name

Type

Description

$name

string

The label of the setting

public withOption($key, $value):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set an option for the setting.

Parameters

Name

Type

Description

$key

string

The option key

$value

The option value

public withTooltip($tooltip):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a tooltip text for this input

Parameters

Name

Type

Description

$tooltip

string

An additional description of the setting

public withTooltipPlacement($tooltipPlacement):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Define the tooltip placement. Possible values are 'bottom', 'top', 'left' or 'right', default is 'top'

Parameters

Name

Type

Description

$tooltipPlacement

string

public withList($min, $max):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Determines whether the declaration is used to render a list of the specified form field.

Parameters

Name

Type

Description

$min

int

Minimum number of entries.

$max

int

Maximum number of entries. If not set or smaller than 0, unlimited entries might be added by the user.

public toArray():array

Get all data as array

SliderSettingFactory

Factory to define a slider in the widget settings.

Namespace

Plenty\Modules\ShopBuilder\Factories\Settings

Methods
public withMin($min):Plenty\Modules\ContentBuilder\Factories\Settings\SliderSettingFactory
Return type: SliderSettingFactory

Set the minimum value of the slider.

Parameters

Name

Type

Description

$min

int

public withMax($max):Plenty\Modules\ContentBuilder\Factories\Settings\SliderSettingFactory
Return type: SliderSettingFactory

Set the maximum value of the slider.

Parameters

Name

Type

Description

$max

int

public withInterval($interval):Plenty\Modules\ContentBuilder\Factories\Settings\SliderSettingFactory
Return type: SliderSettingFactory

Set the interval between the values of the slider.

Parameters

Name

Type

Description

$interval

int

public withPrecision($precision):Plenty\Modules\ContentBuilder\Factories\Settings\SliderSettingFactory
Return type: SliderSettingFactory

Set the number of decimal places of the value.

Parameters

Name

Type

Description

$precision

int

public withShowMinMax($showMinMax):Plenty\Modules\ContentBuilder\Factories\Settings\SliderSettingFactory
Return type: SliderSettingFactory

Set to true to display the minimum and maximum values at each end of the slider.

Parameters

Name

Type

Description

$showMinMax

bool

public withShowTicks($showTicks):Plenty\Modules\ContentBuilder\Factories\Settings\SliderSettingFactory
Return type: SliderSettingFactory

Set to true to display ticks on each value.

Parameters

Name

Type

Description

$showTicks

bool

public static create($data = []):void
Parameters

Name

Type

Description

$data

public withType($type):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the type of the setting.

Parameters

Name

Type

Description

$type

string

public withDefaultValue($defaultValue):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the default value for the setting.

Parameters

Name

Type

Description

$defaultValue

The default value

public withCondition($condition):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a condition if the setting should be visible or not.

Parameters

Name

Type

Description

$condition

string

Condition if the related form element should be visible or not.

public withName($name):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the name of the setting.

Parameters

Name

Type

Description

$name

string

The label of the setting

public withOption($key, $value):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set an option for the setting.

Parameters

Name

Type

Description

$key

string

The option key

$value

The option value

public withTooltip($tooltip):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a tooltip text for this input

Parameters

Name

Type

Description

$tooltip

string

An additional description of the setting

public withTooltipPlacement($tooltipPlacement):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Define the tooltip placement. Possible values are 'bottom', 'top', 'left' or 'right', default is 'top'

Parameters

Name

Type

Description

$tooltipPlacement

string

public withList($min, $max):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Determines whether the declaration is used to render a list of the specified form field.

Parameters

Name

Type

Description

$min

int

Minimum number of entries.

$max

int

Maximum number of entries. If not set or smaller than 0, unlimited entries might be added by the user.

public toArray():array

Get all data as array

SuggestionSettingFactory

Factory to define an input with suggestions in the widget settings.

Namespace

Plenty\Modules\ShopBuilder\Factories\Settings

Methods
public withListBoxValues($listBoxValues):Plenty\Modules\ContentBuilder\Factories\Settings\SuggestionSettingFactory
Return type: SuggestionSettingFactory

Set available values.

Parameters

Name

Type

Description

$listBoxValues

array

public static create($data = []):void
Parameters

Name

Type

Description

$data

public withType($type):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the type of the setting.

Parameters

Name

Type

Description

$type

string

public withDefaultValue($defaultValue):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the default value for the setting.

Parameters

Name

Type

Description

$defaultValue

The default value

public withCondition($condition):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a condition if the setting should be visible or not.

Parameters

Name

Type

Description

$condition

string

Condition if the related form element should be visible or not.

public withName($name):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the name of the setting.

Parameters

Name

Type

Description

$name

string

The label of the setting

public withOption($key, $value):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set an option for the setting.

Parameters

Name

Type

Description

$key

string

The option key

$value

The option value

public withTooltip($tooltip):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a tooltip text for this input

Parameters

Name

Type

Description

$tooltip

string

An additional description of the setting

public withTooltipPlacement($tooltipPlacement):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Define the tooltip placement. Possible values are 'bottom', 'top', 'left' or 'right', default is 'top'

Parameters

Name

Type

Description

$tooltipPlacement

string

public withList($min, $max):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Determines whether the declaration is used to render a list of the specified form field.

Parameters

Name

Type

Description

$min

int

Minimum number of entries.

$max

int

Maximum number of entries. If not set or smaller than 0, unlimited entries might be added by the user.

public toArray():array

Get all data as array

TextSettingFactory

Factory to define a text input in the widget settings.

Namespace

Plenty\Modules\ShopBuilder\Factories\Settings

Methods
public withPassword($isPassword):Plenty\Modules\ContentBuilder\Factories\Settings\TextSettingFactory
Return type: TextSettingFactory

Set to true if the input field should be handled as a password input

Parameters

Name

Type

Description

$isPassword

bool

public withReadonly($isReadonly):Plenty\Modules\ContentBuilder\Factories\Settings\TextSettingFactory
Return type: TextSettingFactory

Set to true if input field should be readonly.

Parameters

Name

Type

Description

$isReadonly

bool

public static create($data = []):void
Parameters

Name

Type

Description

$data

public withType($type):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the type of the setting.

Parameters

Name

Type

Description

$type

string

public withDefaultValue($defaultValue):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the default value for the setting.

Parameters

Name

Type

Description

$defaultValue

The default value

public withCondition($condition):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a condition if the setting should be visible or not.

Parameters

Name

Type

Description

$condition

string

Condition if the related form element should be visible or not.

public withName($name):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the name of the setting.

Parameters

Name

Type

Description

$name

string

The label of the setting

public withOption($key, $value):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set an option for the setting.

Parameters

Name

Type

Description

$key

string

The option key

$value

The option value

public withTooltip($tooltip):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a tooltip text for this input

Parameters

Name

Type

Description

$tooltip

string

An additional description of the setting

public withTooltipPlacement($tooltipPlacement):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Define the tooltip placement. Possible values are 'bottom', 'top', 'left' or 'right', default is 'top'

Parameters

Name

Type

Description

$tooltipPlacement

string

public withList($min, $max):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Determines whether the declaration is used to render a list of the specified form field.

Parameters

Name

Type

Description

$min

int

Minimum number of entries.

$max

int

Maximum number of entries. If not set or smaller than 0, unlimited entries might be added by the user.

public toArray():array

Get all data as array

TextareaSettingFactory

Factory to define a textarea in the widget settings.

Namespace

Plenty\Modules\ShopBuilder\Factories\Settings

Methods
public withFixedHeight($isFixedHeight):Plenty\Modules\ContentBuilder\Factories\Settings\TextareaSettingFactory
Return type: TextareaSettingFactory

Set to true if the height should be fixed.

Parameters

Name

Type

Description

$isFixedHeight

bool

public withMaxRows($maxRows):Plenty\Modules\ContentBuilder\Factories\Settings\TextareaSettingFactory
Return type: TextareaSettingFactory

Set the maximum number of rows for the textarea.

Parameters

Name

Type

Description

$maxRows

int

public static create($data = []):void
Parameters

Name

Type

Description

$data

public withType($type):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the type of the setting.

Parameters

Name

Type

Description

$type

string

public withDefaultValue($defaultValue):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the default value for the setting.

Parameters

Name

Type

Description

$defaultValue

The default value

public withCondition($condition):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a condition if the setting should be visible or not.

Parameters

Name

Type

Description

$condition

string

Condition if the related form element should be visible or not.

public withName($name):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the name of the setting.

Parameters

Name

Type

Description

$name

string

The label of the setting

public withOption($key, $value):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set an option for the setting.

Parameters

Name

Type

Description

$key

string

The option key

$value

The option value

public withTooltip($tooltip):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a tooltip text for this input

Parameters

Name

Type

Description

$tooltip

string

An additional description of the setting

public withTooltipPlacement($tooltipPlacement):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Define the tooltip placement. Possible values are 'bottom', 'top', 'left' or 'right', default is 'top'

Parameters

Name

Type

Description

$tooltipPlacement

string

public withList($min, $max):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Determines whether the declaration is used to render a list of the specified form field.

Parameters

Name

Type

Description

$min

int

Minimum number of entries.

$max

int

Maximum number of entries. If not set or smaller than 0, unlimited entries might be added by the user.

public toArray():array

Get all data as array

UrlSettingFactory

Factory to define an url picker in the widget settings.

Namespace

Plenty\Modules\ShopBuilder\Factories\Settings

Methods
Return type: UrlSettingFactory
Parameters

Name

Type

Description

$internalLinks

array

public static create($data = []):void
Parameters

Name

Type

Description

$data

public withType($type):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the type of the setting.

Parameters

Name

Type

Description

$type

string

public withDefaultValue($defaultValue):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the default value for the setting.

Parameters

Name

Type

Description

$defaultValue

The default value

public withCondition($condition):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a condition if the setting should be visible or not.

Parameters

Name

Type

Description

$condition

string

Condition if the related form element should be visible or not.

public withName($name):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set the name of the setting.

Parameters

Name

Type

Description

$name

string

The label of the setting

public withOption($key, $value):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set an option for the setting.

Parameters

Name

Type

Description

$key

string

The option key

$value

The option value

public withTooltip($tooltip):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Set a tooltip text for this input

Parameters

Name

Type

Description

$tooltip

string

An additional description of the setting

public withTooltipPlacement($tooltipPlacement):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Define the tooltip placement. Possible values are 'bottom', 'top', 'left' or 'right', default is 'top'

Parameters

Name

Type

Description

$tooltipPlacement

string

public withList($min, $max):Plenty\Modules\ContentBuilder\Factories\Settings\BaseSettingFactory
Return type: BaseSettingFactory

Determines whether the declaration is used to render a list of the specified form field.

Parameters

Name

Type

Description

$min

int

Minimum number of entries.

$max

int

Maximum number of entries. If not set or smaller than 0, unlimited entries might be added by the user.

public toArray():array

Get all data as array

ValueListFactory

Create a list of values to be used by settings with multiple predefined values.

Namespace

Plenty\Modules\ShopBuilder\Factories\Settings

Methods
public static make():Plenty\Modules\ContentBuilder\Factories\Settings\ValueListFactory
Return type: ValueListFactory

Create a new factory instance.

public addEntry($value, $caption):Plenty\Modules\ContentBuilder\Factories\Settings\ValueListFactory
Return type: ValueListFactory

Add an entry to the list of values

Parameters

Name

Type

Description

$value

$caption

string

public toArray():void

Get all values.