Permalink
Browse files

Update cookbook/symfony2/working-with-symfony2.markdown

port propelBundle#169
  • Loading branch information...
1 parent 3436587 commit 547dd0d9c77da335bbe1267f8723972d53d33632 @jaugustin jaugustin committed Jul 26, 2012
Showing with 17 additions and 0 deletions.
  1. +17 −0 cookbook/symfony2/working-with-symfony2.markdown
@@ -605,6 +605,23 @@ public function myAction(Post $post)
}
{% endhighlight %}
+**New** with last version of `SensioFrameworkExtraBundle`,
+you can ommit the `class` parameter if your controller parameter is typed,
+this is usefull when you need to set extra `options`.
+
+{% highlight php %}
+<?php
+use BlogBundle\Model\Post;
+
+/**
+ * @ParamConverter("post")
+ */
+public function myAction(Post $post)
+{
+}
+{% endhighlight %}
+
+
### Exclude some parameters ###
You can exclude some attributes from being used by the converter:

0 comments on commit 547dd0d

Please sign in to comment.