8000 minor #13226 [Workflow] Document the optional message of setBlocked()… · symfony/symfony-docs@f713742 · GitHub
[go: up one dir, main page]

Skip to content

Commit f713742

Browse files
committed
minor #13226 [Workflow] Document the optional message of setBlocked() (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()
2 parents 0f102e4 + 15bb0f7 commit f713742

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)
0