Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #247 from jaugustin/feat-named-converter

feat(ParamConverter): add named ParamConverter
  • Loading branch information...
commit 4f3cb7c16a8c8b98890035c48f950d56be899dea 2 parents 6083565 + 1330e3e
@havvg havvg authored
View
2  Resources/config/converters.xml
@@ -10,7 +10,7 @@
<services>
<service id="propel.converter.propel.orm" class="%propel.converter.propel.class%">
- <tag name="request.param_converter" priority="10" />
+ <tag name="request.param_converter" converter="propel" priority="1" />
<call method="setRouter">
<argument type="service" id="router" on-invalid="null" />
View
23 Resources/doc/param_converter.markdown
@@ -27,8 +27,8 @@ public function myAction(Post $post)
}
```
-**New** with last version of `SensioFrameworkExtraBundle`,
-you can ommit the `class` parameter if your controller parameter is typed,
+**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
@@ -109,10 +109,25 @@ public function myAction(Post $post)
{
}
```
-Accepted parmeters for join :
+Accepted parameters for join :
-* left, LEFT, left join, LEFT JOIN, left_join, LEFT_JOIN
+* left, LEFT, left join, LEFT JOIN, left_join, LEFT_JOIN
* right, RIGHT, right join, RIGHT JOIN, right_join, RIGHT_JOIN
* inner, INNER, inner join, INNER JOIN, inner_join, INNER_JOIN
+#### Named converter ####
+
+If you have a conflict with another ParamConverter you can force the `PropelParamConverter` with the `converter` option.
+
+ ``` php
+ <?php
+
+ /**
+ * @ParamConverter("post", converter="propel")
+ */
+ public function myAction(Post $post)
+ {
+ }
+ ```
+
[Back to index](index.markdown)
Please sign in to comment.
Something went wrong with that request. Please try again.