@@ -36,14 +36,31 @@ public function getFunctions()
36
36
);
37
37
}
38
38
39
- public function canTransition ($ object , $ transition , $ name = null )
39
+ /**
40
+ * Returns true if the transition is enabled.
41
+ *
42
+ * @param object $subject A subject
43
+ * @param string $transitionName A transition
44
+ * @param string $name A workflow name
45
+ *
46
+ * @return bool true if the transition is enabled
47
+ */
48
+ public function canTransition ($ subject , $ transitionName , $ name = null )
40
49
{
41
- return $ this ->workflowRegistry ->get ($ object , $ name )->can ($ object , $ transition );
50
+ return $ this ->workflowRegistry ->get ($ subject , $ name )->can ($ subject , $ transitionName );
42
51
}
43
52
44
- public function getEnabledTransitions ($ object , $ name = null )
53
+ /**
54
+ * Returns all enabled transitions.
55
+ *
56
+ * @param object $subject A subject
57
+ * @param string $name A workflow name
58
+ *
59
+ * @return Transition[] All enabled transitions
60
+ */
61
+ public function getEnabledTransitions ($ subject , $ name = null )
45
62
{
46
- return $ this ->workflowRegistry ->get ($ object , $ name )->getEnabledTransitions ($ object );
63
+ return $ this ->workflowRegistry ->get ($ subject , $ name )->getEnabledTransitions ($ subject );
47
64
}
48
65
49
66
public function hasMarkedPlace ($ object , $ place , $ name = null )
0 commit comments