-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[WIP] Add Twig Reference #1878
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
[WIP] Add Twig Reference #1878
Conversation
Well shoot, you beat me to it. You missed two functions though: Functions:
|
@brandonwamboldt can you please give me a link to the ExtensionClass where those functions are defined? So I can see what they do and what parameters they have. |
Oops, forgot that part!
|
The actual extension class is: |
@brandonwamboldt thank you, I will include it into this docs. EDIT: I read something about these functions and it looks like those are added in Symfony2.1. This PR is for 2.0 extensions. I will add them to the list, so I don't forget those. |
+1 Is anyone going to pull this? |
+---------------------------------------------+---------------------------------------------------------------------------+ | ||
| Function Syntax | Usage | | ||
+=============================================+===========================================================================+ | ||
| ``asset(path, packageName)`` | Get the public path of the asset, more information in | |
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.
we should probably mark the optional params: asset(path, packageName = null)
@weaverryan thanks for merging, but there are still some things to do (actually, this is merged too early). We need to link to this document as well as fixing the issues mentioned by @stof. |
…aks to it and adding the `app` global variable
Hey man! No problem! I finally had some time so I merged in and was already working on those items :). I've just pushed them - let me know if you see any issues. Thanks - really cool page to have! Obviously, now we need to work on the changes + new stuff for 2.1. I'll merge 2.0 into 2.1 shortly. Thanks! |
Thank you @weaverryan ! I was a little to fast with my comment... I have left some comments and I am going to create another PR to fix the parameter names in the twig functions (as they are wrong in the I have already found every new 2.1 functions/blocks/filters and listed them in that other issue, so we can add the new stuff fast. I'm going to work on that once you merged Wow, it is already online! I will create a PR to fix the links to the form twig reference, those aren't really nice now. Great job! |
This is a work in progress. It's just a quick draw of what I think the Twig reference should look like.
It shows all Twig Extensions that Symfony2 includes in his templates. When I found a resource with a more detailed description about a tag/filter/function I linked it.
I have used the list I posted earlier. I don't think I have missed an extension, but let me know if I did!
I'm not totally convient about the Rst syntax, but I think it is good (can someone give my a description/resource about the
.. index:
thing?). The document is currently not passed to the Sphinx parser, I will do it soon.