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, mixed data) : void
since |
4.0.0 |
---|
Arguments
- form
\Joomla\CMS\Form\Form
A Form object.- data
mixed
The 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
int
The workflow stage ID.- pks
array
An array of row IDs.- contexts
array
An array of item contexts.
Response
mixed
An 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
array
Id of items to execute the transition- transitionId
int
Id 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\Form
A Form object.- data
mixed
The data expected for the form.
Response
bool|int
An 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
string
The 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
int
The ID of the item copied from- newId
int
The 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\Form
A Form object.- data
mixed
The data expected for the form.