WorkflowBehaviorTrait

Trait which supports state behavior

since

4.0.0

package

Application

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, mixed data) : void
since

4.0.0

Arguments

form

\Joomla\CMS\Form\FormA Form object.

data

mixedThe data expected for the form.

batchWorkflowStage

Batch change workflow stage or current.

batchWorkflowStage(int value, array pks, array contexts) : mixed
since

4.0.0

Arguments

value

intThe workflow stage ID.

pks

arrayAn array of row IDs.

contexts

arrayAn 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 bei the child class

enableWorkflowBatch() : void
since

4.0.0

executeTransition

Runs transition for item.

executeTransition(array pks, int transitionId) : bool
since

4.0.0

Arguments

pks

arrayId 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, mixed data) : bool|int
since

4.0.0

Arguments

form

\Joomla\CMS\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() : void

setUpWorkflow

Set Up the workflow

setUpWorkflow(string extension) : void
since

4.0.0

Arguments

extension

stringThe option and section separated by.

workflowAfterSave

Executing of relevant workflow methods

workflowAfterSave(mixed data) : void
since

4.0.0

Arguments

data

mixed

workflowBeforeSave

Preparation of workflow data/plugins

workflowBeforeSave() : void
since

4.0.0

workflowBeforeStageChange

Let plugins access stage change events

workflowBeforeStageChange() : void
since

4.0.0

workflowCleanupBatchMove

Batch change workflow stage or current.

workflowCleanupBatchMove(int oldId, int newId) : null
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, mixed data) : void
since

4.0.0

see \Joomla\CMS\MVC\Model\FormField

Arguments

form

\Joomla\CMS\Form\FormA Form object.

data

mixedThe data expected for the form.

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