Wizard

Contracts

WizardDataRepositoryContract

This interface provides methods to create, get, list, update and delete wizard data

Namespace

Plenty\Modules\Wizard\Contracts

Methods

public create(string $wizardKey, array $steps = []):void

Creates a new WizardData.

Parameters
string $wizardKey
array $steps
public createDataOption(string $wizardKey, array $data = [], string $optionId = "default"):void

Creates a new WizardData option

Parameters
string $wizardKey
array $data
string $optionId
public get(string $wizardKey):void

Get a single WizardData by its ID

Parameters
string $wizardKey
public getByOptionId(string $wizardKey, string $optionId = "default"):void

Get a single WizardData for an option ID

Parameters
string $wizardKey
string $optionId
public findByWizardKey(string $wizardKey):void
Parameters
string $wizardKey
public list(int $page = 1, int $itemsPerPage = 50, array $filters = []):array

List all WizardData for current plenty ID.

Parameters
int $page
int $itemsPerPage
array $filters
public update(string $wizardKey, array $properties):void

Update data for a WizardData

Parameters
string $wizardKey
array $properties
public updateDataOption(string $wizardKey, string $optionId, array $data, string $stepKey, bool $skipValidation = false):void

Update data for a WizardData option

Parameters
string $wizardKey
string $optionId
array $data
string $stepKey
bool $skipValidation
public delete(string $wizardKey):void

Delete a single WizardData by its ID

Parameters
string $wizardKey
public deleteDataOption(string $wizardKey, string $optionId):void

Delete a single WizardData by its ID

Parameters
string $wizardKey
string $optionId
public finalize(string $wizardKey, string $optionId = "default", array $data = []):void

Finalize wizard

Parameters
string $wizardKey
string $optionId
array $data
public clearCriteria():void

Resets all Criteria filters by creating a new instance of the builder object.

public applyCriteriaFromFilters():void

Applies criteria classes to the current repository.

public setFilters(array $filters = []):void

Sets the filter array.

Parameters
array $filters
public getFilters():void

Returns the filter array.

public getConditions():void

Returns a collection of parsed filters as Condition object

public clearFilters():void

Clears the filter array.

WizardContainerContract

This interface provides methods to register, get and list all wizards.

Namespace

Plenty\Modules\Wizard\Contracts

Methods

public register(string $wizardKey, string $wizard):void

Register a wizard

Parameters
string $wizardKey
string $wizard
public registerFolders(string $folderClass):void

Register a wizard folder

Parameters
string $folderClass
public get(string $wizardKey, bool $skipTranslation = false):Wizard

Get a single wizard by its key

Parameters
string $wizardKey
bool $skipTranslation
public all():array

List all wizards class names

public folders(bool $hierarchy = false):array

List all wizard folders

Parameters
bool $hierarchy

WizardActionHandler

This interface provides a template for an action handler for Wizards

Namespace

Plenty\Modules\Wizard\Contracts

WizardRepositoryContract

This interface provides methods to get and list wizards.

Namespace

Plenty\Modules\Wizard\Contracts

WizardDynamicLoader

This interface provides methods to dynamically load data in the wizard ui.

Namespace

Plenty\Modules\Wizard\Contracts

WizardDataModifier

This interface provides methods to modify wizard data.

Namespace

Plenty\Modules\Wizard\Contracts

Methods

public modify(array $parameters):void

Modify a wizard data for a step

Parameters
array $parameters

WizardSettingsHandler

This interface provides methods to handle final wizard data.

Namespace

Plenty\Modules\Wizard\Contracts

Methods

public handle(array $parameters):bool

Handle wizard data for a finalized wizard

Parameters
array $parameters

Models

Wizard

The wizard model.

Namespace

Plenty\Modules\Wizard\Models

Properties

Type Name Description
string title The title
string key The wizard's key
string settingsHandlerClass Settings handler
string shortDescription The short description
string translationKey The translation key
string deleteConfirmationText Delete confirmation Text in deletion overlay
array topics The topics
array steps Wizard's structure
int priority Wizard's listing priority in the overview
string relevance Wizard's level of relevance
array keywords Keywords describing the wizard

Methods

public toArray()

Returns this model as an array.

WizardData

The wizard data model.

Namespace

Plenty\Modules\Wizard\Models

Properties

Type Name Description
string uuid
string plentyIdHash
string wizardKey
array data
array steps

Methods

public toArray()

Returns this model as an array.

WizardSection

The wizard step section model.

Namespace

Plenty\Modules\Wizard\Models

Properties

Type Name Description
string title The title
string description The description
array form The form

Methods

public toArray()

Returns this model as an array.

WizardStep

The wizard step model.

Namespace

Plenty\Modules\Wizard\Models

Properties

Type Name Description
string title The title
string description The short description
string modifierClass The modifier class
string validationClass The validation class
array sections The sections

Methods

public toArray()

Returns this model as an array.

WizardFolder

The wizard folder.

Namespace

Plenty\Modules\Wizard\Models

Properties

Type Name Description
string name The name
int priority The priority
string shortDescription The short description
string parent The parent

Methods

public toArray()

Returns this model as an array.

WizardFormOption

The wizard form option.

Namespace

Plenty\Modules\Wizard\Models

Properties

Type Name Description
string name The name
string placeholder The placeholder
string caption The caption. Only for checkboxValues.
string label The label
string tooltip The tooltip

Methods

public toArray()

Returns this model as an array.

Services

WizardFolderProvider

Register a wizard folder.

Namespace

Plenty\Modules\Wizard\Services

Methods

public folders():array

WizardProvider

Register a wizard.

Namespace

Plenty\Modules\Wizard\Services

Methods

public structure():array

Services

DataSources

BaseWizardDataSource

Base data source for wizards

Namespace

Plenty\Modules\Wizard\Services\DataSources

Properties

Type Name Description
wizardKey
dataStructure

Methods

public setWizardKey(string $wizardKey):void

Sets the wizard key for this data source

Parameters
string $wizardKey
public getIdentifiers():array

List of option identifiers

public create(array $steps = []):array

Create data

Parameters
array $steps
public get():array

Get data

public update(array $properties = []):void

Update data

Parameters
array $properties
public delete():void

Delete data

public createDataOption(array $data = [], string $optionId = "default"):array

Create data option

Parameters
array $data
string $optionId
public getByOptionId(string $optionId = "default"):array

Get data option by its option ID

Parameters
string $optionId
public updateDataOption(string $optionId = "default", array $data = [], string $stepKey = ""):array

Update data option

Parameters
string $optionId
array $data
string $stepKey
public deleteDataOption(string $optionId):void

Delete data option

Parameters
string $optionId
public finalize(string $optionId, array $data = []):void
Parameters
string $optionId
array $data