Skip to content

Commit 15bb0f7

Browse files
committed
[Workflow] Document the optional message of setBlocked()
1 parent 58c9c6f commit 15bb0f7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

workflow.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,8 +423,7 @@ missing a title::
423423
$title = $post->title;
424424

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

@@ -436,6 +435,10 @@ missing a title::
436435
}
437436
}
438437

438+
.. versionadded:: 5.1
439+
440+
The optional second argument of ``setBlocked()`` was introduced in Symfony 5.1.
441+
439442
Event Methods
440443
~~~~~~~~~~~~~
441444

0 commit comments

Comments
 (0)