Skip to content

Added missing events description #7528

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
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
added commented aspects
  • Loading branch information
Guite authored Mar 6, 2017
commit 96bad83c08b4aafe44d0e1c95c893f9dc4b24efc
9 changes: 4 additions & 5 deletions workflow/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,10 @@ Available events

The following events are dispatched for all workflows:

* ``workflow.guard``: occurs just before starting a transition. It allows you to
prevent the transition by calling ``$event->setBlocked(true);`` as shown above.
* ``workflow.leave``: occurs just after an object has left it's current state.
* ``workflow.transition``: occurs just before starting to transition to the new state.
* ``workflow.enter``: occurs just after the object has entered into the new state.
* ``workflow.guard``: occurs just before a transition is started and when testing which transitions are available. It allows you to define that the transition is not allowed by calling ``$event->setBlocked(true);`` as shown above.
* ``workflow.leave``: carries the marking with the initial places, occurs just after an object has left it's current state.
Copy link
Contributor

Choose a reason for hiding this comment

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

it's => its.

To avoid confusion, maybe we should not use "initial" and say something like:
carries the marking with the places held before an object leaves it's current state.

* ``workflow.transition``: carries the marking with the current places, occurs just before starting to transition to the new state.
Copy link
Contributor

Choose a reason for hiding this comment

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

carries the marking with the places held just after leaving the previous state, and just before entering into the new state.

* ``workflow.enter``: carries the marking with the new places, occurs just after the object has entered into the new state.
Copy link
Contributor

Choose a reason for hiding this comment

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

This one needs no "correction", but to be consistent with others, what about:
carries the marking with the places held after the object has entered into the new state.

Copy link
Contributor

Choose a reason for hiding this comment

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

So symfony/symfony#21793 is merged now and this should be reworded to:

carries the marking with the current places, occurs just before the object enters into the new places.


2. Workflow-specific events

Expand Down