Skip to content

Commit 3042fc7

Browse files
committed
minor #18812 [Workflow] Mention that the initial marking is configured, not set in code (javiereguiluz)
This PR was merged into the 5.4 branch. Discussion ---------- [Workflow] Mention that the initial marking is configured, not set in code Fixes #18578. Commits ------- 8d326cb [Workflow] Mention that the initial marking is configured, not set in code
2 parents 92bcd0f + 8d326cb commit 3042fc7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

workflow.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ The configured property will be used via its implemented getter/setter methods b
190190
{
191191
$this->currentPlace = $currentPlace;
192192
}
193+
194+
// you don't need to set the initial marking in the constructor or any other method;
195+
// this is configured in the workflow with the 'initial_marking' option
193196
}
194197

195198
.. note::
@@ -226,6 +229,8 @@ what actions are allowed on a blog post::
226229
use Symfony\Component\Workflow\Exception\LogicException;
227230

228231
$post = new BlogPost();
232+
// you don't need to set the initial marking with code; this is configured
233+
// in the workflow with the 'initial_marking' option
229234

230235
$workflow = $this->container->get('workflow.blog_publishing');
231236
$workflow->can($post, 'publish'); // False

0 commit comments

Comments
 (0)