WorkflowBehaviorTrait

Trait which supports state behavior

since

4.0.0

package

Joomla CMS

Methods

addTransitionField

Adds a transition field to the form. Can be overwritten by the child class if not needed

addTransitionField(\Joomla\CMS\Form\Form form,  data) : 
since

4.0.0

Arguments

form

FormA Form object.

data

mixedThe data expected for the form.

Response

void

batchWorkflowStage

Batch change workflow stage or current.

batchWorkflowStage( value, mixed||string|int pks, mixed||string|int contexts) : 
since

4.0.0

Arguments

value

intThe workflow stage ID.

pks

array<string|int, mixed>An array of row IDs.

contexts

array<string|int, mixed>An array of item contexts.

Response

mixedAn array of new IDs on success, boolean false on failure.

enableWorkflowBatch

Add the workflow batch to the command list. Can be overwritten by the child class

enableWorkflowBatch() : 
since

4.0.0

Response

void

executeTransition

Runs transition for item.

executeTransition(mixed||string|int pks,  transitionId) : 
since

4.0.0

Arguments

pks

array<string|int, mixed>Id of items to execute the transition

transitionId

intId of transition

Response

bool

getStageForNewItem

Try to load a workflow stage for newly created items which does not have a workflow assigned yet. If the category is not the carrier, overwrite it on your model and deliver your own carrier.

getStageForNewItem(\Joomla\CMS\Form\Form form,  data) : bool|int
since

4.0.0

Arguments

form

FormA Form object.

data

mixedThe data expected for the form.

Response

bool|intAn integer, holding the stage ID or false

importWorkflowPlugins

Import the Workflow plugins.

importWorkflowPlugins() : 

Response

void

setUpWorkflow

Set Up the workflow

setUpWorkflow( extension) : 
since

4.0.0

Arguments

extension

stringThe option and section separated by.

Response

void

workflowAfterSave

Executing of relevant workflow methods

workflowAfterSave( data) : 
since

4.0.0

Arguments

data

mixed

Response

void

workflowBeforeSave

Preparation of workflow data/plugins

workflowBeforeSave() : 
since

4.0.0

Response

void

workflowBeforeStageChange

Let plugins access stage change events

workflowBeforeStageChange() : 
since

4.0.0

Response

void

workflowCleanupBatchMove

Batch change workflow stage or current.

workflowCleanupBatchMove( oldId,  newId) : 
since

4.0.0

Arguments

oldId

intThe ID of the item copied from

newId

intThe ID of the new item

Response

null

workflowPreprocessForm

Method to allow derived classes to preprocess the form.

workflowPreprocessForm(\Joomla\CMS\Form\Form form,  data) : 
since

4.0.0

see FormField

Arguments

form

FormA Form object.

data

mixedThe data expected for the form.

Response

void

Properties

extension

The name of the component.

since

4.0.0

Type(s)

string

section

The section of the component.

since

4.0.0

Type(s)

string

workflowEnabled

Is workflow for this component enabled?

since

4.0.0

Type(s)

bool

workflow

The workflow object

since

4.0.0

Type(s)

Workflow