WorkflowExtension
class WorkflowExtension extends AbstractExtension
WorkflowExtension.
Methods
| __construct(Registry $workflowRegistry) | ||
| getFunctions() | ||
| bool | canTransition(object $subject, string $transitionName, string $name = null) Returns true if the transition is enabled. | |
| Transition[] | getEnabledTransitions(object $subject, string $name = null) Returns all enabled transitions. | |
| bool | hasMarkedPlace(object $subject, string $placeName, string $name = null) Returns true if the place is marked. | |
| string[]|int[] | getMarkedPlaces(object $subject, bool $placesNameOnly = true, string $name = null) Returns marked places. | |
| getName() |
Details
__construct(Registry $workflowRegistry)
Parameters
| Registry | $workflowRegistry |
getFunctions()
bool canTransition(object $subject, string $transitionName, string $name = null)
Returns true if the transition is enabled.
Parameters
| object | $subject | A subject |
| string | $transitionName | A transition |
| string | $name | A workflow name |
Return Value
| bool | true if the transition is enabled |
Transition[] getEnabledTransitions(object $subject, string $name = null)
Returns all enabled transitions.
Parameters
| object | $subject | A subject |
| string | $name | A workflow name |
Return Value
| Transition[] | All enabled transitions |
bool hasMarkedPlace(object $subject, string $placeName, string $name = null)
Returns true if the place is marked.
Parameters
| object | $subject | A subject |
| string | $placeName | A place name |
| string | $name | A workflow name |
Return Value
| bool | true if the transition is enabled |
string[]|int[] getMarkedPlaces(object $subject, bool $placesNameOnly = true, string $name = null)
Returns marked places.
Parameters
| object | $subject | A subject |
| bool | $placesNameOnly | If true, returns only places name. If false returns the raw representation |
| string | $name | A workflow name |
Return Value
| string[]|int[] |
getName()
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Bridge/Twig/Extension/WorkflowExtension.html