-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[ExpressionLanguage] Document ExpressionFunction::fromPhp #7517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
ExpressionFunction::fromPhp('strtoupper'); | ||
|
||
It allows namespaced PHP function where second parameter must be defined to name expression:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[...] where the second [...]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Please also add a .. versionadded:: 3.3
The ``ExpressionFunction::fromPhp()`` method was introduced in Symfony 3.3. |
👍 Status: Reviewed |
Result: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@maidmaid This should work. The template used to render the preview is not exactly the same as the one used on symfony.com (we don't update it every time small changes are made to the website). |
Cool, thank you for your reviews :) |
@@ -90,6 +90,21 @@ register. | |||
} | |||
} | |||
|
|||
.. tip:: | |||
|
|||
You can create an expression function from a PHP function with the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"You can create ..." => "To create ..."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Thank you @maidmaid. |
…hp (maidmaid, javiereguiluz) This PR was merged into the master branch. Discussion ---------- [ExpressionLanguage] Document ExpressionFunction::fromPhp cf symfony/symfony#21122 Commits ------- 415c4ec Update extending.rst 478400a Minor reword 059155f Add versionadded 6c9e09d Fix typo c70ea7f Fix typo 6d9af37 Add fromPhp tip
cf symfony/symfony#21122