We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58c9c6f commit 15bb0f7Copy full SHA for 15bb0f7
workflow.rst
@@ -423,8 +423,7 @@ missing a title::
423
$title = $post->title;
424
425
if (empty($title)) {
426
- // Block the transition "to_review" if the post has no title
427
- $event->setBlocked(true);
+ $event->setBlocked(true, 'This blog post cannot be marked as reviewed because it has no title.');
428
}
429
430
@@ -436,6 +435,10 @@ missing a title::
436
435
437
438
+.. versionadded:: 5.1
439
+
440
+ The optional second argument of ``setBlocked()`` was introduced in Symfony 5.1.
441
442
Event Methods
443
~~~~~~~~~~~~~
444
0 commit comments