Back to Joomla project (class list)

Class WorkflowBehaviorTrait - list of methods

Trait which supports state behavior
Package: Joomla\CMS\MVC\Model
Copyright: (C) 2020 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE
Located at: Joomla/MVC/Model/WorkflowBehaviorTrait.php
Project: Joomla

Method Summary

public void
(mixed $extension)

Set Up the workflow
Parameters
  • string $extension The option and section separated by.
Returns
  • void
Since
  • 4.0.0
Show source code of this method: setUpWorkflow Source Code

protected void
()

Add the workflow batch to the command list. Can be overwritten bei the child class
Returns
  • void
Since
  • 4.0.0
Show source code of this method: enableWorkflowBatch Source Code

public void
(\Joomla\CMS\Form\Form $form, mixed $data)

Method to allow derived classes to preprocess the form.
Parameters
  • \Joomla\CMS\Form\Form $form A Form object.
  • mixed $data The data expected for the form.
Returns
  • void
Since
  • 4.0.0
-
  • \Joomla\CMS\MVC\Model\FormField
Show source code of this method: workflowPreprocessForm Source Code

public void
()

Let plugins access stage change events
Returns
  • void
Since
  • 4.0.0
Show source code of this method: workflowBeforeStageChange Source Code

public void
()

Preparation of workflow data/plugins
Returns
  • void
Since
  • 4.0.0
Show source code of this method: workflowBeforeSave Source Code

public void
(mixed $data)

Executing of relevant workflow methods
Returns
  • void
Since
  • 4.0.0
Show source code of this method: workflowAfterSave Source Code

public mixed
(int $value, array $pks, array $contexts)

Batch change workflow stage or current.
Parameters
  • int $value The workflow stage ID.
  • array $pks An array of row IDs.
  • array $contexts An array of item contexts.
Returns
  • mixed An array of new IDs on success, boolean false on failure.
Since
  • 4.0.0
Show source code of this method: batchWorkflowStage Source Code

public null
(mixed $oldId, mixed $newId)

Batch change workflow stage or current.
Parameters
  • int $oldId The ID of the item copied from
  • int $newId The ID of the new item
Returns
  • null
Since
  • 4.0.0
Show source code of this method: workflowCleanupBatchMove Source Code

public bool
(array $pks, int $transitionId)

Runs transition for item.
Parameters
  • array $pks Id of items to execute the transition
  • int $transitionId Id of transition
Returns
  • bool
Since
  • 4.0.0
Show source code of this method: executeTransition Source Code

protected void
()

Import the Workflow plugins.
Parameters
  • \Joomla\CMS\Form\Form $form A Form object.
  • mixed $data The data expected for the form.
Returns
  • void
Show source code of this method: importWorkflowPlugins Source Code

protected void
(\Joomla\CMS\Form\Form $form, mixed $data)

Adds a transition field to the form. Can be overwritten by the child class if not needed
Parameters
  • \Joomla\CMS\Form\Form $form A Form object.
  • mixed $data The data expected for the form.
Returns
  • void
Since
  • 4.0.0
Show source code of this method: addTransitionField Source Code

protected bool|int
(\Joomla\CMS\Form\Form $form, mixed $data)

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.
Parameters
  • \Joomla\CMS\Form\Form $form A Form object.
  • mixed $data The data expected for the form.
Returns
  • bool|int An integer, holding the stage ID or false
Since
  • 4.0.0
Show source code of this method: getStageForNewItem Source Code

Properties Summary

protected string
$extension
The name of the component.
Since
  • 4.0.0
protected string
$section
The section of the component.
Since
  • 4.0.0
protected bool
$workflowEnabled
Is workflow for this component enabled?
Since
  • 4.0.0
protected \Joomla\CMS\Workflow\Workflow
$workflow
The workflow object
Since
  • 4.0.0

Tags Summary

Since
4.0.0