-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Workflow] Added explaination on context in events and initial marking #14678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
82a94f7
a3fd749
85ae576
c0062ea
3e7f249
1bd334a
3ec9197
a4fce22
7b0d118
d6480bb
a8961ba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -94,6 +94,16 @@ you can retrieve a workflow from it and use it as follows:: | |||||
$workflow->can($blogPost, 'publish'); // True | ||||||
$workflow->getEnabledTransitions($blogPost); // $blogPost can perform transition "publish" or "reject" | ||||||
|
||||||
If you want to initiate your workflow, you can call ``getMarking``:: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And I'm not super confortable with this sentence. What does mean "initiate your workflow"? What about something like
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure I understand this sentence : And instead of So, I would say :
WDYT ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you are right about initial marking :) I used the old name, sorry. You sentence is correct, let's go for it. Minor detail: - in the configuration
+ from the configuration There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. DONE ! If it's ok for you, I let you resolve the conversation and maybe... merge the PR ? |
||||||
|
||||||
// ... | ||||||
$blogPost = new BlogPost(); | ||||||
$workflow = $registry->get($blogPost); | ||||||
|
||||||
// initiate workflow | ||||||
$workflow->getMarking($blogPost); | ||||||
|
||||||
|
||||||
epitre marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
Learn more | ||||||
---------- | ||||||
|
||||||
|
Uh oh!
There was an error while loading. Please reload this page.