From 279a9c1cc5902084c2c89c7d7209d4ffdbe0b697 Mon Sep 17 00:00:00 2001 From: Matthieu Calie Date: Tue, 17 Apr 2018 15:25:44 +0200 Subject: [PATCH] [Workflow] Use subject to fetch state_machine --- workflow/state-machines.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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'); // ... }