Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc3f38b1

Browse files
committed
Merge branch '4.4' into 5.1
* 4.4: [Workflow] Added initialization docs
2 parents8ebccad +b40bfae commitc3f38b1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

‎components/workflow.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,20 @@ you can retrieve a workflow from it and use it as follows::
9494
$workflow->can($blogPost, 'publish'); // True
9595
$workflow->getEnabledTransitions($blogPost); // $blogPost can perform transition "publish" or "reject"
9696

97+
Initialization
98+
--------------
99+
100+
If the property of your object is ``null`` and you want to set it with the
101+
``initial_marking`` from the configuration, you can call the ``getMarking()``
102+
method to initialize the object property::
103+
104+
// ...
105+
$blogPost = new BlogPost();
106+
$workflow = $registry->get($blogPost);
107+
108+
// initiate workflow
109+
$workflow->getMarking($blogPost);
110+
97111
Learn more
98112
----------
99113

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp