File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -222,6 +222,30 @@ could easily enable logging::
222222 $subscriber = new AuditTrailListener($logger);
223223 $dispatcher->addSubscriber($subscriber);
224224
225+ Event Methods
226+ ~~~~~~~~~~~~~
227+
228+ Each workflow event is an instance of :class: `Symfony\\ Component\\ Workflow\\ Event\\ Event `.
229+ This means that each event has access to the following information:
230+
231+ :method: `Symfony\\ Component\\ Workflow\\ Event\\ Event::getMarking `
232+ Returns the :class: `Symfony\\ Component\\ Workflow\\ Marking ` of the workflow.
233+
234+ :method: `Symfony\\ Component\\ Worflow\\ Event\\ Event::getSubject `
235+ Returns the object that dispatches the event.
236+
237+ :method: `Symfony\\ Component\\ Workflow\\ Event\\ Event::getTransition `
238+ Returns the :class: `Symfony\\ Component\\ Workflow\\ Transition ` that dispatches the event.
239+
240+ For Guard Events, there is an extended class :class: `Symfony\\ Component\\ Workflow\\ Event\\ GuardEvent `.
241+ This class has two more methods:
242+
243+ :method: `Symfony\\ Component\\ Workflow\\ Event\\ GuardEvent::isBlocked `
244+ Returns if transition is blocked.
245+
246+ :method: `Symfony\\ Component\\ Workflow\\ Event\\ GuardEvent::setBlocked `
247+ Sets the blocked value.
248+
225249Usage in Twig
226250-------------
227251
You can’t perform that action at this time.
0 commit comments