Merge pull request #169 from jaugustin/patch-4

Update Resources/doc/param_converter.markdown
This commit is contained in:
William Durand 2012-07-26 00:17:36 -07:00
commit 4980f54b6e

View file

@ -1,7 +1,7 @@
The PropelParamConverter
========================
You can use the PropelParamConverter with the [SensioFrameworkExtraBundle](http://github.com/sensio/SensioFrameworkExtraBundle).
You can use the `PropelParamConverter` with the [SensioFrameworkExtraBundle](http://github.com/sensio/SensioFrameworkExtraBundle).
You just need to put the right _Annotation_ on top of your controller:
``` php
@ -27,6 +27,22 @@ public function myAction(Post $post)
}
```
**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`.
``` php
<?php
use BlogBundle\Model\Post;
/**
* @ParamConverter("post")
*/
public function myAction(Post $post)
{
}
```
#### Exclude some parameters ####
You can exclude some attributes from being used by the converter: