diff --git a/workflow.rst b/workflow.rst index 21c9488ed01..3524719bb4e 100644 --- a/workflow.rst +++ b/workflow.rst @@ -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.'); } } @@ -436,6 +435,10 @@ missing a title:: } } +.. versionadded:: 5.1 + + The optional second argument of ``setBlocked()`` was introduced in Symfony 5.1. + Event Methods ~~~~~~~~~~~~~
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: