8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3732796 commit b40bfaeCopy full SHA for b40bfae
components/workflow.rst
@@ -94,6 +94,20 @@ you can retrieve a workflow from it and use it as follows::
94
$workflow->can($blogPost, 'publish'); // True
95
$workflow->getEnabledTransitions($blogPost); // $blogPost can perform transition "publish" or "reject"
96
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
111
Learn more
112
----------
113
0 commit comments