WorkflowExtension
extends AbstractExtension
in package
WorkflowExtension.
Tags
Table of Contents
- $workflowRegistry : mixed
- __construct() : mixed
- buildTransitionBlockerList() : TransitionBlockerList
- canTransition() : bool
- Returns true if the transition is enabled.
- getEnabledTransitions() : array<string|int, Transition>
- Returns all enabled transitions.
- getFilters() : array<string|int, TwigFilter>
- Returns a list of filters to add to the existing list.
- getFunctions() : array<string|int, TwigFunction>
- Returns a list of functions to add to the existing list.
- getMarkedPlaces() : array<string|int, string>|array<string|int, int>
- Returns marked places.
- getMetadata() : mixed
- Returns the metadata for a specific subject.
- getName() : mixed
- getNodeVisitors() : array<string|int, NodeVisitorInterface>
- Returns the node visitor instances to add to the existing list.
- getOperators() : array<string|int, array<string|int, mixed>>
- Returns a list of operators to add to the existing list.
- getTests() : array<string|int, TwigTest>
- Returns a list of tests to add to the existing list.
- getTokenParsers() : array<string|int, TokenParserInterface>
- Returns the token parser instances to add to the existing list.
- hasMarkedPlace() : bool
- Returns true if the place is marked.
Properties
$workflowRegistry
private
mixed
$workflowRegistry
Methods
__construct()
public
__construct(Registry $workflowRegistry) : mixed
Parameters
- $workflowRegistry : Registry
Return values
mixed —buildTransitionBlockerList()
public
buildTransitionBlockerList(mixed $subject, string $transitionName[, string $name = null ]) : TransitionBlockerList
Parameters
- $subject : mixed
- $transitionName : string
- $name : string = null
Return values
TransitionBlockerList —canTransition()
Returns true if the transition is enabled.
public
canTransition(object $subject, string $transitionName[, string $name = null ]) : bool
Parameters
- $subject : object
-
A subject
- $transitionName : string
-
A transition
- $name : string = null
-
A workflow name
Return values
bool —true if the transition is enabled
getEnabledTransitions()
Returns all enabled transitions.
public
getEnabledTransitions(object $subject[, string $name = null ]) : array<string|int, Transition>
Parameters
- $subject : object
-
A subject
- $name : string = null
-
A workflow name
Return values
array<string|int, Transition> —All enabled transitions
getFilters()
Returns a list of filters to add to the existing list.
public
getFilters() : array<string|int, TwigFilter>
Return values
array<string|int, TwigFilter> —getFunctions()
Returns a list of functions to add to the existing list.
public
getFunctions() : array<string|int, TwigFunction>
Return values
array<string|int, TwigFunction> —getMarkedPlaces()
Returns marked places.
public
getMarkedPlaces(object $subject[, bool $placesNameOnly = true ][, string $name = null ]) : array<string|int, string>|array<string|int, int>
Parameters
- $subject : object
-
A subject
- $placesNameOnly : bool = true
-
If true, returns only places name. If false returns the raw representation
- $name : string = null
-
A workflow name
Return values
array<string|int, string>|array<string|int, int> —getMetadata()
Returns the metadata for a specific subject.
public
getMetadata(object $subject, string $key[, string|Transition|null $metadataSubject = null ][, string $name = null ]) : mixed
Parameters
- $subject : object
-
A subject
- $key : string
- $metadataSubject : string|Transition|null = null
-
Use null to get workflow metadata Use a string (the place name) to get place metadata Use a Transition instance to get transition metadata
- $name : string = null
Return values
mixed —getName()
public
getName() : mixed
Return values
mixed —getNodeVisitors()
Returns the node visitor instances to add to the existing list.
public
getNodeVisitors() : array<string|int, NodeVisitorInterface>
Return values
array<string|int, NodeVisitorInterface> —getOperators()
Returns a list of operators to add to the existing list.
public
getOperators() : array<string|int, array<string|int, mixed>>
Return values
array<string|int, array<string|int, mixed>> —First array of unary operators, second array of binary operators
getTests()
Returns a list of tests to add to the existing list.
public
getTests() : array<string|int, TwigTest>
Return values
array<string|int, TwigTest> —getTokenParsers()
Returns the token parser instances to add to the existing list.
public
getTokenParsers() : array<string|int, TokenParserInterface>
Return values
array<string|int, TokenParserInterface> —hasMarkedPlace()
Returns true if the place is marked.
public
hasMarkedPlace(object $subject, string $placeName[, string $name = null ]) : bool
Parameters
- $subject : object
-
A subject
- $placeName : string
-
A place name
- $name : string = null
-
A workflow name
Return values
bool —true if the transition is enabled