Skip to content

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

Closed
wants to merge 3 commits into from

Conversation

jangrubenbecher
Copy link
Contributor

to fix 7691, I added method descriptions to the usage site of the workflow component. Added the new getWorkflowName-method description as well

@HeahDude
Copy link
Contributor

HeahDude commented Apr 8, 2017

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 getWorkflowName() method so we can merge the documentation of the others in 3.2?

Then you'll be able to submit another PR to add this method with a .. versionadded:: directive.

Thanks!

@HeahDude HeahDude added this to the 3.2 milestone Apr 8, 2017
@jangrubenbecher
Copy link
Contributor Author

done

Copy link
Member

@xabbuh xabbuh left a 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.

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
Copy link
Member

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

@@ -222,6 +222,30 @@ could easily enable logging::
$subscriber = new AuditTrailListener($logger);
$dispatcher->addSubscriber($subscriber);

Event methods
Copy link
Member

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"

@@ -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`.
Copy link
Member

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?

: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:
Copy link
Member

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?

Sets the blocked value



Copy link
Member

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 :)

Copy link
Contributor Author

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?

Copy link
Member

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.

Copy link
Contributor

@HeahDude HeahDude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

xabbuh added a commit that referenced this pull request Apr 13, 2017
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
@xabbuh
Copy link
Member

xabbuh commented Apr 13, 2017

Thank you very much for these great changes @jangrubenbecher! I have squashed your commits and merged them into the 3.2 branch. That's why your PR is shown as closed instead of merged.

@xabbuh xabbuh closed this Apr 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants