Commit Graph

35 Commits

Author SHA1 Message Date
Fabien Potencier
64d43c806b restricted to only URIs the first argument of the render tag 2012-12-20 08:31:14 +01:00
alexandresalome
3cdf371c2b [TwigBundle] Move the {% render ... %} node to a dedicated extension + Remove service container
The purpose of the TemplatingExtension is ambigous. This first step move the actions logical
to a dedicated extension and reduce the dependency to the HTTP Kernel.
2011-05-24 10:56:45 +02:00
Pascal Borreli
8c0beea677 [Phpdoc] Cleaning/fixing 2011-04-23 15:18:47 +00:00
Fabien Potencier
55e6883a88 [TwigBundle] removed obsolete code 2011-04-23 10:55:52 +02: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
Brikou CARRE
e898445b94 removed empty lines/trailing spaces 2011-04-15 21:12:02 +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
e912b347f0 moved integration between the Translation component and Twig to a Symfony Bridge 2011-03-23 15:23:52 +01:00
Fabien Potencier
8c423edfef replaced symfony-project.org by symfony.com 2011-03-06 12:40:06 +01:00
Dominique Bongiraud
64fb94c725 normalized license messages in PHP files 2011-01-18 08:07:46 +01:00
Fabien Potencier
055b6e4d6e made a big refactoring of the templating sub-framework
* better separation of concerns
 * made TwigBundle independant of the PHP Engine from FrameworkBundle (WIP)
 * removed one layer of abstraction in the Templating component (renderers)
 * made it easier to create a new Engine for any templating library
 * made engines lazy-loaded (PHP engine for instance is not started if you only use Twig)
 * reduces memory footprint (if you only use one engine)
 * reduces size of compiled classes.php cache file
2011-01-15 07:43:05 +01:00
Fabien Potencier
7b7e83f428 removed js and css helpers and Twig integration
These helpers have been removed as they do not work as expected.
Among other things, the order is not the right one when using PHP
templates, and adding assets from an included template is not
possible when using Twig templates.

This should be replaced by integrating a third-party library that
manages assets: minification, compilation, packaging, ...
2011-01-04 14:07:25 +01:00
Fabien Potencier
0e487cdda6 [TwigBundle] replaced current {{ foo }} syntax for translation placeholders to %foo% 2011-01-04 08:47:23 +01:00
Fabien Potencier
8b843e2662 [TwigBundle] fixed trans tag due to Twig changes 2011-01-03 20:09:48 +01:00
Fabien Potencier
3f492cae40 [TwigBundle] removed usage of HelperTokenParser for the js/css tags 2011-01-03 12:12:26 +01:00
Fabien Potencier
840bd8aacd [TwigBundle] removed usage of HelperTokenParser for the 'render' tag 2011-01-03 11:56:52 +01:00
Christophe Coevoet
da9d2e82f6 Added the Typehint needed by the type-hinting in Twig_Node 2011-01-02 16:25:18 +01:00
Fabien Potencier
5d65f3edbd [TwigBundle] converted path and url tags to functions
{% url 'blog_post' with { 'id': post.id } %} -> {{ url('blog_post', { 'id': post.id }) }}
{% path 'blog_post' with { 'id': post.id } %} -> {{ path('blog_post', { 'id': post.id }) }}
2010-12-20 09:39:51 +01:00
Fabien Potencier
d935df036c [TwigBundle] removed unused tag and contenttag Twig tags 2010-12-20 09:05:16 +01:00
Fabien Potencier
faac8e6ffd [TwigBundle] replaced the ifrole tag with a has_role function
Before:

{% ifrole "ROLE_ADMIN" %}
    Only show if you have the ROLE_ADMIN role...
{% endifrole %}

After:

{% if has_role("ROLE_ADMIN") %}
    Only show if you have the ROLE_ADMIN role...
{% endif %}
2010-12-19 22:07:15 +01:00
Fabien Potencier
07eceb7ade [TwigBundle] fixed ifrole tag when security context is not enabled 2010-11-26 18:06:04 +01:00
Fabien Potencier
67f6889287 [TwigBundle] added support for Twig_Template instances as argument to include tag 2010-11-21 09:33:35 +01:00
Fabien Potencier
84cf5698c5 [TwigBundle] fixed include tag to reflect the new syntax from Twig 2010-11-19 09:51:12 +01:00
jeff
52ec8752d8 When route_attributes is null an exception is raised. 2010-11-06 14:34:08 +01:00
Fabien Potencier
1e13ecb5f3 [TwigBundle] split the route tag to 2 tags: path and url 2010-11-03 18:15:54 +01:00
Fabien Potencier
dd7e33af6b [TwigBundle] fixed the include tag to behave like the standard Twig include tag 2010-10-20 14:02:39 +02:00
Fabien Potencier
f216f313e8 added the Security Component and its integration into the MVC framework
Happy birthday symfony!
2010-10-19 13:33:17 +02:00
Fabien Potencier
2525998f6e replaced form field rendering with plain templates
Documentation available here:

http://docs.symfony-reloaded.org/master/guides/form/
2010-10-05 08:34:33 +02:00
Fabien Potencier
47bc809dc3 [TwigBundle] added tests for trans tag and filter 2010-10-02 09:39:48 +02:00
Fabien Potencier
77125288e7 [TwigBundle] updated nodes for the latest version of Twig 2010-10-02 09:39:29 +02:00
Fabien Potencier
68bff2d214 [TwigBundle] fixed trans tags 2010-10-01 22:19:59 +02:00
Fabien Potencier
416bd7872e [TwigBundle] optimized calls to helpers 2010-10-01 20:50:31 +02:00
Fabien Potencier
eff1bdf50f [TwigBundle] made trans and transchoice tags more flexible
Both tags accept variables now:

    {% trans label %}

    {% transchoice %}
      {{ error }}
    {% endtranschoice %}

Optionally, the with keywords allows to pass the placeholder values:

    {% trans label with vars %}
2010-09-30 19:13:01 +02:00
Fabien Potencier
4297609156 [TwigBundle] moved translator helpers to their own extension (removed usage of the magic _view variable context) 2010-09-30 10:14:58 +02:00
Fabien Potencier
d6f55c31d1 [TwigBundle] added helpers for translations 2010-09-27 09:45:58 +02:00