8000 minor #8395 Update business-logic.rst (RaitoCZ) · symfony/symfony-docs@9e6bf99 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9e6bf99

Browse files
committed
minor #8395 Update business-logic.rst (RaitoCZ)
This PR was merged into the 3.3 branch. Discussion ---------- Update business-logic.rst previous example didn't show the usage of service passed via argument but fetching via $this->get. Commits ------- a5d2304 Update business-logic.rst
2 parents 05db604 + a5d2304 commit 9e6bf99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

best_practices/business-logic.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ Now you can use the custom slugger in any controller class, such as the
121121
// $slugger = $this->get('app.slugger');
122122
123123
if ($form->isSubmitted() && $form->isValid()) {
124-
$slug = $this->get('app.slugger')->slugify($post->getTitle());
124+
$slug = $slugger->slugify($post->getTitle());
125125
$post->setSlug($slug);
126126
127127
// ...

0 commit comments

Comments
 (0)
0