diff --git a/workflow/state-machines.rst b/workflow/state-machines.rst index db7156d32b8..b0b4516eadd 100644 --- a/workflow/state-machines.rst +++ b/workflow/state-machines.rst @@ -205,9 +205,9 @@ you can get this state machine by injecting the Workflow registry service:: $this->workflows = $workflows; } - public function someMethod() + public function someMethod($subject) { - $stateMachine = $this->workflows->get('pull_request'); + $stateMachine = $this->workflows->get($subject, 'pull_request'); // ... }