Свойство | Type | Description | |
---|---|---|---|
$actionData | The data submitted when an action is performed | ||
$element | The element for this workflow | ||
$error | mixed | Any errors within the workflow will be stored here | |
$registeredActionEvents | array | An array of the event triggers that are registered with an action | |
$user | The user using the workflow All actions will be recorded against this user | ||
$userIds | array | An array of the different pimcore user ids that the current user is related to - first in array is the users id, - any additional are the role ids that have been assigned to the user | |
$workflow | Pimcore\WorkflowManagement\Workflow | The loaded workflow |
Méthode | Description | |
---|---|---|
__construct ( $element, null $user = null ) | ||
actionHasTransition ( $actionConfig ) | ||
elementCanAction ( $element ) : boolean | Returns whether or not an element can be actioned | |
elementHasWorkflow ( |
Returns whether or not an element has a workflow | |
getActionData ( ) | ||
getAdditionalFieldsForAction ( $actionName ) : array | mixed | Shortcut method - probably should clean this up a bit more | |
getAvailableActions ( ) : mixed | Get the available actions that can be performed on an element | |
getAvailableStates ( $actionName ) : array | Returns the available state configurations given an action NOTE: ASSUMES THE ACTION EXISTS | |
getAvailableStatuses ( $actionName, $stateName ) : array | Returns the available statuses given an action and a state | |
getElement ( ) | ||
getElementState ( ) : string | Return the element state | |
getElementStatus ( ) | Returns the current status of an object | |
getError ( ) | ||
getNotesRequiredForAction ( string $actionName ) : boolean | Returns whether or not notes are required for a given action on the current object Assumes the action is valid at that point in time | |
getObjectLayout ( ) : string | null | Returns the objects layout configuration given the current place in the workflow If no layout is specified then null will be returned | |
getUser ( ) | ||
getWorkflow ( ) : Pimcore\WorkflowManagement\Workflow | ||
getWorkflowStateForElement ( ) : null | |
||
performAction ( mixed $actionName, array $formData = [] ) | Performs an action | |
setActionData ( $data ) | ||
setElementState ( $newState ) | ||
setElementStatus ( $newStatus ) | ||
userCanPerformAction ( $actionName, null $statusName = null ) : boolean | Returns whether or not a user can perform an action if a status is given then it will be taken into consideration | |
validateAction ( $actionName, $newState, $newStatus ) : boolean | Validates that a transition between requested states can be done on an element NOTE: DOES NOT VALIDATE FIELDS @see performAction |
Méthode | Description | |
---|---|---|
initUserIds ( ) | ||
initWorkflow ( ) | Loads the workflow into the manager | |
registerActionEvents ( $actionConfig ) | Used by performAction to initialise events | |
unregisterActionEvents ( ) | Unregisters events (before, success, failure) |
public __construct ( $element, null $user = null ) | ||
$element | ||
$user | null | - optional parameter so that importers can use some functions of manager too. |
public static elementCanAction ( $element ) : boolean | ||
$element | ||
Résultat | boolean |
public static elementHasWorkflow ( |
||
$element | ||
Résultat | boolean |
public getAdditionalFieldsForAction ( $actionName ) : array | mixed | ||
$actionName | ||
Résultat | array | mixed |
public getAvailableActions ( ) : mixed | ||
Résultat | mixed |
public getAvailableStates ( $actionName ) : array | ||
$actionName | ||
Résultat | array |
public getAvailableStatuses ( $actionName, $stateName ) : array | ||
$actionName | ||
$stateName | ||
Résultat | array |
public getElementState ( ) : string | ||
Résultat | string |
public getElementStatus ( ) |
public getNotesRequiredForAction ( string $actionName ) : boolean | ||
$actionName | string | |
Résultat | boolean |
public getObjectLayout ( ) : string | null | ||
Résultat | string | null |
public getWorkflow ( ) : Pimcore\WorkflowManagement\Workflow | ||
Résultat | Pimcore\WorkflowManagement\Workflow |
public getWorkflowStateForElement ( ) : null | |
||
Résultat | null | |
public performAction ( mixed $actionName, array $formData = [] ) | ||
$actionName | mixed | |
$formData | array |
public userCanPerformAction ( $actionName, null $statusName = null ) : boolean | ||
$actionName | ||
$statusName | null | |
Résultat | boolean |
public validateAction ( $actionName, $newState, $newStatus ) : boolean | ||
$actionName | ||
$newState | ||
$newStatus | ||
Résultat | boolean |
protected $actionData |
protected Concrete,Pimcore\Model\Object|Document,Pimcore\Model|Asset,Pimcore\Model $element | ||
Résultat |
protected mixed $error | ||
Résultat | mixed |
protected array $registeredActionEvents | ||
Résultat | array |
protected User,Pimcore\Model $user | ||
Résultat |
protected array $userIds | ||
Résultat | array |