We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 59a686e commit 3b14460Copy full SHA for 3b14460
src/AppBundle/Controller/Admin/BlogController.php
@@ -70,6 +70,10 @@ public function newAction(Request $request)
70
71
$form->handleRequest($request);
72
73
+ // the isSubmitted() method is completely optional because the other
74
+ // isValid() method already checks whether the form is submitted.
75
+ // However, we explicitly add it to improve code readability.
76
+ // See http://symfony.com/doc/current/best_practices/forms.html#handling-form-submits
77
if ($form->isSubmitted() && $form->isValid()) {
78
$post->setSlug($this->get('slugger')->slugify($post->getTitle()));
79
0 commit comments