Skip to content

Commit

Permalink
minor #13226 [Workflow] Document the optional message of setBlocked()…
Browse files Browse the repository at this point in the history
… (javiereguiluz)

This PR was merged into the master branch.

Discussion
----------

[Workflow] Document the optional message of setBlocked()

Fixes #12686.

Commits
-------

15bb0f7 [Workflow] Document the optional message of setBlocked()
  • Loading branch information
javiereguiluz committed Feb 23, 2020
2 parents 0f102e4 + 15bb0f7 commit f713742
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions workflow.rst
Expand Up @@ -423,8 +423,7 @@ missing a title::
$title = $post->title;

if (empty($title)) {
// Block the transition "to_review" if the post has no title
$event->setBlocked(true);
$event->setBlocked(true, 'This blog post cannot be marked as reviewed because it has no title.');
}
}

Expand All @@ -436,6 +435,10 @@ missing a title::
}
}

.. versionadded:: 5.1

The optional second argument of ``setBlocked()`` was introduced in Symfony 5.1.

Event Methods
~~~~~~~~~~~~~

Expand Down

0 comments on commit f713742

Please sign in to comment.