new TwigFunction('workflow_marked_places',
$this->
getMarkedPlaces(...
)),
new TwigFunction('workflow_metadata',
$this->
getMetadata(...
)),
new TwigFunction('workflow_transition_blockers',
$this->
buildTransitionBlockerList(...
)),
];
} /**
* Returns true if the transition is enabled.
*/
public function canTransition(object
$subject, string
$transitionName, string
$name = null
): bool
{ return $this->workflowRegistry->
get($subject,
$name)->
can($subject,
$transitionName);
} /**
* Returns all enabled transitions.
*
* @return Transition[]
*/
public function getEnabledTransitions(object
$subject, string
$name = null
): array
{ return $this->workflowRegistry->
get($subject,
$name)->
getEnabledTransitions($subject);
}