Commit Graph

628 Commits

Author SHA1 Message Date
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
6dc6d4a7d3 [TwigBundle] fixed trans tag 2010-09-29 18:11:25 +02:00
Fabien Potencier
7b9a523a43 [TwigBundle] fixed trans tag 2010-09-29 15:26:39 +02:00
Fabien Potencier
8ad2fd2123 [TwigBundle] renamed Helpers to HelpersExtension 2010-09-29 11:39:23 +02:00
Fabien Potencier
a6dc10c31a changed templating name notation
Old notation: bundle:section:name.format:renderer (where both format and renderer are optional)
New notation: bundle:section:name.format.renderer (where only format is optional)

Valid new template names: Blog:Post:index.php, Blog:Post:index.xml.php

The new notation is more explicit and put all templating engines on the same level (there is no
more the concept of a "default" templating engine).

Even if the notation changed, the semantic has not. So, the logical template name for the above
examples is still 'index'. So, if you use a database loader for instance, the template
name is 'index' and everything else are options.

Upgrading current applications can be easily done by appending .php to each existing template
name reference (in both controllers and templates), and changing :twig to .twig for Twig templates
(for twig templates, you should also add .twig within templates themselves when referencing
another Twig templates).
2010-09-28 08:33:33 +02:00
Fabien Potencier
d6f55c31d1 [TwigBundle] added helpers for translations 2010-09-27 09:45:58 +02:00
Fabien Potencier
d657adbfa2 removed Symfony\Framework
Things have been moved to Symfony\Component\HttpKernel
and Symfony\Bundle\FrameworkBundle

The kernel configuration namespace was removed and merged
with the main web configuration namespace (kernel:config => web:config,
kernel:test => web:test, and kernel:session => web:session):

Before:
<kernel:config charset="UTF-8" error_handler="null" />

<web:config csrf-secret="xxxxxxxxxx">
    <web:router resource="%kernel.root_dir%/config/routing.xml" />
    <web:validation enabled="true" annotations="true" />
</web:config>

After:
<web:config csrf-secret="xxxxxxxxxx" charset="UTF-8" error-handler="null">
    <web:router resource="%kernel.root_dir%/config/routing.xml" />
    <web:validation enabled="true" annotations="true" />
</web:config>

Renamed classes:

Symfony\{Framework => Bundle\FrameworkBundle}\Cache\Cache
Symfony\{Framework => Bundle\FrameworkBundle}\Client
Symfony\{Framework => Bundle\FrameworkBundle}\Debug\EventDispatcher
Symfony\{Framework => Bundle\FrameworkBundle}\Debug\EventDispatcherTraceableInterface
Symfony\{Framework => Bundle\FrameworkBundle}\EventDispatcher
Symfony\{Framework => Component\HttpFoundation}\UniversalClassLoader
Symfony\{Framework => Component\HttpKernel}\Bundle\Bundle
Symfony\{Framework => Component\HttpKernel}\Bundle\BundleInterface
Symfony\{Framework => Component\HttpKernel}\ClassCollectionLoader
Symfony\{Framework => Component\HttpKernel}\Debug\ErrorException
Symfony\{Framework => Component\HttpKernel}\Debug\ErrorHandler
Symfony\{Bundle\FrameworkBundle => Component\HttpKernel}\Debug\ExceptionListener
Symfony\{Framework => Component\HttpKernel}\Kernel
2010-09-17 12:58:24 +02:00
fivestar
8367df1265 [TwigBundle] fixed grammar for render helper. 2010-08-31 07:39:50 +02:00
Fabien Potencier
994a6c36ac changed actions::render() helper method signature 2010-08-30 09:15:54 +02:00
Fabien Potencier
1687831cb7 [TwigBundle] made a small optimization 2010-08-22 15:36:09 +02:00
Fabien Potencier
0319838cdc [TwigBundle] added a flash tag 2010-08-22 15:32:15 +02:00
Fabien Potencier
bf82cf42dd renamed Symfony\Components to Symfony\Component 2010-08-20 23:09:55 +02:00
Fabien Potencier
17bc06a4d2 made some cleanup 2010-08-10 16:13:51 +02:00
Fabien Potencier
9e82497d5b removed BundleInterface::buildContainer() method (extensions are now automatically registered -- or override the getExtensions() method if you do not follow the conventions) 2010-08-10 16:07:44 +02:00
Fabien Potencier
355ed9b5f9 renamed annotation to tag in the DIC 2010-08-05 07:34:53 +02:00
Kris Wallsmith
fa3980f66f Removed some use statements that are no longer needed. 2010-08-04 07:37:12 +02:00
Fabien Potencier
ee2ff39eaf removed @package and @subpackage annotations 2010-08-01 23:06:28 +02:00
Fabien Potencier
1a9f2ca755 updated PHPDoc as the API tool knows about the current use statements 2010-07-27 15:33:28 +02:00
Fabien Potencier
c57cae7600 fixed test configuration and broken tests 2010-07-18 12:16:59 +02:00
fivestar
22f6eec0ef [TwigBundle] fixed class name in twig.xml 2010-07-17 07:55:09 +02:00
Fabien Potencier
2a051b5039 moved DI extensions classes to their own sub-namespace 2010-07-16 11:12:49 +02:00
Fabien Potencier
7796eb213c merged BuilderConfiguration and Builder classes into a new ContainerBuilder class 2010-07-15 15:20:41 +02:00
Fabien Potencier
f26abdfadd fixed phpdoc for DI extensions 2010-07-15 10:27:49 +02:00
Fabien Potencier
0163178f7b changed the BundleInterface::buildContainer() signature 2010-07-13 12:34:33 +02:00
Fabien Potencier
0fbb1b916b cleaned up the DI extension loading mechanism 2010-07-09 16:28:06 +02:00
Fabien Potencier
da9f36ca86 renamed Symfony\Foundation to Symfony\Framework
In existing applications, you need to updated the autoload.php file, the
XXXKernel file and all XXXBundle classes.
2010-07-09 10:25:54 +02:00
Fabien Potencier
6213fdefb9 renamed Symfony\Framework to Symfony\Bundle
For existing Symfony2 applications, references to Symfony\Framework are found
in the main Kernel class (registerBundles() and registerBundleDirs()), and in
all Controller classes. You also need to change the console script.
2010-07-09 10:25:15 +02:00