-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
added Workflow event methods documentation #7774
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
Conversation
Hello @jangrubenbecher, thank you for documenting this. We need to have a first step without the new feature introduced in 3.3, could you please remove the mention of Then you'll be able to submit another PR to add this method with a Thanks! |
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR looks really great! Thank you very much @jangrubenbecher! I have left some minor comments, but we could also address them while merging.
workflow/usage.rst
Outdated
This means that each event has access to the following information: | ||
|
||
:method:`Symfony\\Component\\Workflow\\Event\\Event::getMarking` | ||
Returns the :class:`Symfony\\Component\\Workflow\\Marking` of the workflow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should end all descriptions with a dot
workflow/usage.rst
Outdated
@@ -222,6 +222,30 @@ could easily enable logging:: | |||
$subscriber = new AuditTrailListener($logger); | |||
$dispatcher->addSubscriber($subscriber); | |||
|
|||
Event methods |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
according to our guidelines the headline should be "Event Methods"
workflow/usage.rst
Outdated
@@ -222,6 +222,30 @@ could easily enable logging:: | |||
$subscriber = new AuditTrailListener($logger); | |||
$dispatcher->addSubscriber($subscriber); | |||
|
|||
Event methods | |||
~~~~~~~~~~~~~ | |||
Each workflow event is an instance of :class:`Symfony\\Component\\Workflow\\Event\\Event`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a blank line before the paragraph?
workflow/usage.rst
Outdated
:method:`Symfony\\Component\\Workflow\\Event\\Event::getTransition` | ||
Returns the :class:`Symfony\\Component\\Workflow\\Transition` that dispatches the event | ||
|
||
For Guard Events, there is an extended class :class:`Symfony\\Component\\Workflow\\Event\\GuardEvent`. This class has two more methods: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a line break after the first sentence?
workflow/usage.rst
Outdated
Sets the blocked value | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one blank line is enough :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xabbuh Should I change something you mentioned above, or will it be done while merging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whatever you prefer. :) If you like to do it yourself before we merge it, that'll be fine. Otherwise, it will be no problem to do so while merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This PR was submitted for the master branch but it was merged into the 3.2 branch instead (closes #7774). Discussion ---------- added Workflow event methods documentation to fix 7691, I added method descriptions to the usage site of the workflow component. Added the new getWorkflowName-method description as well Commits ------- 12b0f04 added Workflow event methods documentation
Thank you very much for these great changes @jangrubenbecher! I have squashed your commits and merged them into the |
to fix 7691, I added method descriptions to the usage site of the workflow component. Added the new getWorkflowName-method description as well