Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
[Workflow] Do not talk about registry#17878
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -58,33 +58,12 @@ The ``Workflow`` can now help you to decide what *transitions* (actions) are all | ||
| on a blog post depending on what *place* (state) it is in. This will keep your domain | ||
| logic in one place and not spread all over your application. | ||
| Usage | ||
| ----- | ||
| // ... | ||
| // Consider that $blogPost is in place "draft" by default | ||
| $blogPost = new BlogPost(); | ||
Contributor 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. $workflow is not defined anymore MemberAuthor 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. it is defined in line 55. Contributor 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. Yes, but shouldn't we show an example of injecting the workflow into a controller action or a service? There is no example for this, right? Contributor 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. Oh I think it's mentioned here: | ||
| $workflow->can($blogPost, 'publish'); // False | ||
| $workflow->can($blogPost, 'to_review'); // True | ||
| @@ -103,7 +82,6 @@ method to initialize the object property:: | ||
| // ... | ||
| $blogPost = new BlogPost(); | ||
| // initiate workflow | ||
| $workflow->getMarking($blogPost); | ||
Contributor 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. $workflow is not defined anymore MemberAuthor 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. it is defined in line 55. | ||