Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f713742

Browse filesBrowse 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
Copy full SHA for f713742

File tree

1 file changed

+5
-2
lines changed
Filter options

1 file changed

+5
-2
lines changed

‎workflow.rst

Copy file name to clipboardExpand all lines: workflow.rst
+5-2Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.