Fabien Potencier
ee12b67e4e
[TwigBridge] rewrote the Twig translation extractor
...
* The extractor is now reusable as this is a proper Twig node visitor
* The new extractor covers more cases
2011-09-23 09:38:20 +02:00
Fabien Potencier
c6308a5daf
merged branch stof/trans_locale (PR #1808 )
...
Commits
-------
85c0087
[TwigBridge] Made the locale configurable for the trans and transchoice tags
3ea31a0
[TwigBridge] Made the locale configurable for the trans and transchoice filters
Discussion
----------
Trans locale
This allows setting the locale when translating in a Twig template. This was already allowed in the Translator and in the PHP templates
2011-07-27 07:44:42 +02:00
Fabien Potencier
04ac1fdba2
[Routing] changed UrlGeneratorInterface::generate() signature to allow passing objects instead of arrays
2011-07-26 08:00:41 +02:00
Christophe Coevoet
3ea31a0263
[TwigBridge] Made the locale configurable for the trans and transchoice filters
2011-07-26 01:25:25 +02:00
marc.weistroff
2b4cc9bd06
[Form] Changed collection prototype rendering.
...
Based on PR 1500. It is now rendered inside an attribute of collection
tag.
2011-07-22 11:01:55 +02:00
Fabien Potencier
634131bc77
[Twig] made a small optimization to avoid problems with XDebug when rendering forms with deep nested collections
2011-07-16 20:40:19 +02:00
Victor Berchet
2c1108ce6b
[Form] Revert the ability to override anything else than the text of the label while rendering a row
2011-06-22 08:36:45 +02:00
Victor Berchet
da467a6b11
[Form] Fix the exception message when no block is found while rendering
2011-06-20 12:29:05 +02:00
Victor Berchet
41e07c96e3
[Form] Optimize rendering
2011-06-20 12:29:04 +02:00
Victor Berchet
f729c6ba93
[Form] Add the ability to override label & widget options when rendering a row
2011-06-20 12:29:04 +02:00
Victor Berchet
e43fb989e3
[Form][TwigBridge] Make FormExtension::render() recursively callable to ease theming
2011-06-20 11:39:23 +02:00
Victor Berchet
b709551252
[Order] Make Form::types and FormView::types use the same order (Parent > Child)
2011-06-15 01:45:26 +02:00
Victor Berchet
bdd755e45b
[Form] Fix the exception message when no block is found
2011-06-14 16:45:03 +02:00
Victor Berchet
c68c511388
[Form] Make theming form prototypes consistent (start by looking for a '_<id>_<section>' block)
2011-06-14 16:36:31 +02:00
Victor Berchet
b19052f879
[Form][TwigBridge] Improve the cache layer by caching blocks instead of templates
2011-06-12 12:56:25 +02:00
Victor Berchet
9135f963db
[Form][TwigBridge] Make the template cache more efficient
2011-06-12 12:15:48 +02:00
Victor Berchet
8677aa3dce
[Form][TwigBridge] Fix rendering
2011-06-12 11:33:17 +02:00
Fabien Potencier
0a7ce63d8f
Merge remote branch 'vicb/twig-theme-inheritance'
...
* vicb/twig-theme-inheritance:
[Form] Further tweaks of the twig theme inheritance
[Form] Fix twig theme inheritance
2011-06-09 07:46:50 +02:00
Victor Berchet
5060702669
[Form] Further tweaks of the twig theme inheritance
2011-06-08 14:46:34 +02:00
Victor Berchet
bee505a4bf
[Form] Fix twig theme inheritance
2011-06-08 14:21:09 +02:00
Fabien Potencier
566511e9e7
moved some FormView methods to FormUtil where they really belongs
2011-06-08 14:07:04 +02:00
Victor Berchet
b12b11c131
[Form] Never render a view again
...
If some of the nested views are rendered individually they should not be rendered again when calling form_rest.
A typical would be when some nested file views are rendered, form_rest should not render them again.
It is still possible to render a label once the widget has been rendered. This is for checkboxes and radios
where the widget is typically rendered before the label.
2011-06-06 18:01:03 +02:00
Pascal Borreli
404c452c0b
[Various] Phpdoc & typos
2011-06-04 15:30:56 +00:00
Fabien Potencier
2093a45aef
merged stloyd/form_label
2011-06-01 11:11:25 +02:00
stloyd
cb22ccc516
[Form] Added missing feature for adding attributes to an field label
2011-05-31 17:01:28 +02:00
Victor Berchet
b61929bf4a
[Form] The variable stack should not persist between section rendering ( fixes #1157 )
2011-05-30 19:25:02 +02:00
Victor Berchet
d375379a6a
[Twig][Form] Tweak form extension phpDoc and code
2011-05-30 18:24:12 +02:00
Victor Berchet
2b99d45dd3
[FormView] fix phpDoc
2011-05-30 15:21:15 +02:00
Victor Berchet
eb10c66a55
[Twig][Form] Optimize form rendering
2011-05-20 16:45:57 +02:00
Bernhard Schussek
eb50d766da
[Form] Fixed variable scope when entering nested form helpers
...
The consequence of this commit is that variables are accessible that have been passed to a surrounding form helper.
Example template:
{% block my_widget_label %}
<label>{{ label }}
{% endblock %}
{% block my_widget_row %}
{# It is not necessary to explicitely pass through the label variable #}
{{ form_label(form) }}
{{ form_widget(form) }}
{% endblock %}
Example usage:
{{ form_row(form.mywidget, { 'label': 'My Widget' }) }}
2011-05-04 15:40:15 +02:00
Bernhard Schussek
38098604af
[Form] Added tests for blocks/templates in the format _<ID>_(widget|row|label|...)
2011-05-04 15:33:51 +02:00
Fabien Potencier
6180b6aeb5
[TwigBundle] removed obsolete code
2011-04-29 10:48:20 +02:00
Fabien Potencier
a204aec08b
added the possibility to easily customize the template of just one widget of a form
2011-04-29 00:20:21 +02:00
Fabien Potencier
509f3dd454
removed the possibility to pass a template to render_widget()
...
This has been removed as the same can be achieved in a cleaner way:
* Use plain HTML with calls to more granular Twig form functions
* Create a macro if you really want to reuse the template snippet elsewhere
2011-04-28 12:19:29 +02:00
Artur Kotyrba
d506a55b40
[Bridge][Twig] removed unused argument passed to setRendered() method
2011-04-25 22:58:23 +02:00
Pascal Borreli
8c0beea677
[Phpdoc] Cleaning/fixing
2011-04-23 15:18:47 +00:00
Eriksen Costa
589b0ab4ed
Merge branch 'master' into form-frameworkbundle-form-guessers-fix
...
Conflicts:
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddFormGuessersPass.php
src/Symfony/Component/Form/MoneyField.php
2011-04-21 23:03:40 -03:00
Fabien Potencier
286c45733e
removed the possibility to pass a message to the trans tag
...
The trans tag should only be used with static texts as automatic output escaping does not occur.
2011-04-21 09:10:47 +02:00
Fabien Potencier
54b77d24dd
made the %count% variable automatically available when using the transchoice filter (similar to how the tag works)
2011-04-21 09:01:11 +02:00
Bernhard Schussek
273d72ef75
[Form] Changed separator for Twig blocks from double underscore to single underscore to match the PHP template separator
2011-04-18 14:28:01 +02:00
Henrik Bjørnskov
e687685f98
[Form] change FormView::setVar,getVar,getVars,hasVar to set,get,all,has
...
[Form] Fixed {get,set,has}Var references in templating php
[Form] Added getVars to FormView to ease usage in Twig. Also added some phpdoc and cleaned up the get method by adding a default value
[Form] Fix
[Form] Delete file generated by test
2011-04-15 15:25:37 +02:00
Bernhard Schussek
2ddc85ae5a
[Form][Twig] Removed obsolete form_data() helper
2011-04-14 15:14:19 +02:00
Bernhard Schussek
72b17cd67c
[Form] Renamed TemplateContext to FormView
2011-04-14 15:02:51 +02:00
Bernhard Schussek
ca6ae09779
[Form] Removed TemplateContext::create()
2011-04-14 14:42:17 +02:00
Bernhard Schussek
ce5f3073bd
Fixed test suite and names of accessor methods in TemplateContext
2011-04-14 03:52:52 +02:00
Bernhard Schussek
96f040cec1
[Form] Added extensive test coverage for div_layout.html.twig
2011-04-14 03:15:56 +02:00
Bernhard Schussek
8031ad77c8
Merge remote branch 'fabpot/form' into fabpot_merge
2011-04-13 15:58:15 +02:00
Martin Hason
d300b94745
[Bridge][Twig] added transchoice filter
2011-04-12 11:10:55 +02:00
Fabien Potencier
7f2294395c
[Form] reverted the templating part to be similar to what we have today
2011-04-11 16:42:51 +02:00
Fabien Potencier
faf9782e6f
renamed Twig TransExtension to TranslationExtension
2011-03-28 16:16:54 +02:00
Fabien Potencier
9595963c2b
[Routing] changed interface of the router twig extension as we don't need a full router
2011-03-23 16:27:08 +01:00
Fabien Potencier
82dec51b30
moved integration between the Yaml component and Twig to a Symfony Bridge
2011-03-23 15:50:55 +01:00
Fabien Potencier
e912b347f0
moved integration between the Translation component and Twig to a Symfony Bridge
2011-03-23 15:23:52 +01:00
Fabien Potencier
3e5bd67dac
moved integration between Routing and Twig to a Symfony Bridge
2011-03-23 15:16:57 +01:00