Commit Graph

126 Commits

Author SHA1 Message Date
Fabien Potencier 3f9453c8ea added doc for the optimizer extension 2010-11-28 16:55:40 +01:00
Arnaud Le Blanc c34dee83f2 updated doc for the pre_escape filter option 2010-11-28 08:14:37 +01:00
Fabien Potencier f4c55791f7 added some example usage for the defined test in the doc 2010-11-26 19:14:17 +01:00
Fabien Potencier 4bf33bf8e8 fixed typo 2010-11-26 17:21:29 +01:00
Fabien Potencier 9d8583efcc rewrote expression parser with a new algorithm to limit the depth of nested calls
This change has no impact for the end user, but many internal benefits:

* less nested calls (was the primary reason for the change as xdebug limits the depth of nested calls);
* less code;
* code is much cleaner (I have removed all the parsing "hacks");
* faster;
* more flexible (we will now be able to expose an API to add new operators);
* easier to maintain.
2010-11-26 16:35:59 +01:00
Fabien Potencier 5b4c074223 added a defined test (strict_variables is now useable) 2010-11-24 09:47:51 +01:00
Fabien Potencier 4778822863 added _charset as a special variable that references the current charset 2010-11-20 14:44:00 +01:00
Fabien Potencier 1d2afa097f added the spaceless tag 2010-11-19 13:26:23 +01:00
Fabien Potencier 38acf6f134 removed trim_blocks option
The trim_blocks option has been removed as the rendered output depends on the value of this option.
This is not a problem for HTML output, but it's a big one if you want to output
plain text for instance.

The behavior now is the same as if the trim_blocks option is set to true. It mimicks
the behavior of PHP tags.
2010-11-19 13:21:24 +01:00
Fabien Potencier 001685ba13 added support for is*() methods for attributes (foo.bar now looks for foo->getBar() or foo->isBar()) 2010-11-16 10:51:23 +01:00
Fabien Potencier ad58f1e9a7 made a clarification to the doc 2010-11-07 22:18:41 +01:00
ornicar b54292327e Fix replace filter name in documentation 2010-11-07 20:40:49 +01:00
Arnaud Le Blanc c04d119d10 update docs for automatic escaping 2010-11-07 20:24:58 +01:00
Fabien Potencier 6859c089af added a note about using rewind() after look() 2010-11-07 14:37:08 +01:00
Fabien Potencier 011e727b22 fixed documentation and added infix notation for in (already supported for is) 2010-11-07 14:21:10 +01:00
Fabien Potencier 10cab46129 made the include tag more flexible 2010-11-01 04:24:32 +01:00
Fabien Potencier d70af74d1f fixed typos in the docs 2010-10-19 13:19:52 +02:00
Fabien Potencier 3daa9f095c fixed typo in the doc 2010-10-11 12:27:59 +02:00
Fabien Potencier 685cc49be1 updated doc 2010-10-06 15:11:15 +02:00
Fabien Potencier 29b020eb2f changed the way to access nodes and attributes from a node
Before:
  Nodes were accessed via node properties ($node->body)
  Attributes were accessed via node array access ($node['name'])

After:
  Nodes are accessed via getNode(), setNode(), ... ($node->getNode('body'))
  Attributes are accessed via getAttribute(), setAttribute(), ... ($node->getAttribute('name'))

The change was necessary because of side-effects. This is one more time the
demonstration that being explicit is always better than magic ;)
2010-10-02 08:29:25 +02:00
henrikbjorn 56caee0937 renamed |safe to |raw to avoid unnecesarry confusion about what the tags does.
Discussion can be viewed here http://groups.google.com/group/symfony-devs/browse_thread/thread/b927063310c74411. All tests pass.
2010-10-01 19:17:22 +02:00
Fabien Potencier e4d3f43664 added a replace filter 2010-10-01 14:16:02 +02:00
Fabien Potencier 5a354ea859 made a small update to doc and rename a test file 2010-09-12 08:01:34 +02:00
Fabien Potencier 1cf01ce927 added a constant filter (refs #120) 2010-09-12 08:00:21 +02:00
Mark Story 1e9493df29 added the constant() test (closes #120) 2010-09-12 07:50:05 +02:00
Hugo Hamon 81006eed21 [doc] fixed typos in several chapters 2010-09-03 12:04:18 +02:00
Mark Story 6193ab1c9c Fixing a few small typos/grammatical errors. 2010-08-17 07:30:45 +02:00
Fabien Potencier ebe8f237f8 updated doc (closes #100) 2010-08-14 09:05:04 +02:00
Fabien Potencier 5adc74c5dd added version information in the doc 2010-08-13 19:17:13 +02:00
Fabien Potencier 1eef779e00 added a trans filter (closes #85) 2010-08-13 19:16:00 +02:00
Fabien Potencier 5d6e7e2e01 added 'test' feature via the 'is' operator (closes #88) 2010-08-13 16:22:54 +02:00
Fabien Potencier 30de2dae95 removed the debug tag (should be done in an extension) 2010-08-13 08:13:54 +02:00
Fabien Potencier c0334a3e8d added a note about the self variable before 0.9.9 2010-07-26 10:53:43 +02:00
Mark Story df0651b9af Updating documentation for addExtension() 2010-07-26 10:43:42 +02:00
Fabien Potencier 35290cd5ad fixed doc 2010-07-04 18:45:09 +02:00
Fabien Potencier 80af31538a added the special _context variable to reference the current context 2010-06-29 08:33:25 +02:00
Fabien Potencier 2c1eb31021 added a way to translate strings coming from a variable ({% trans var %}) (closes #69) 2010-06-28 15:20:10 +02:00
fivestar 336c7b1183 [doc] fixed typo in doc 2010-06-25 11:29:37 +02:00
Fabien Potencier 2ce6b27fe4 changed the default value of strict_variables to false 2010-06-12 16:47:14 +02:00
Fabien Potencier a8031fc96a added self variable, simplified macro management, added some more documentation for macros (closes #61) 2010-06-12 11:27:41 +02:00
Fabien Potencier 7e926fc235 added Twig_Template instance support to the include tag 2010-06-10 10:08:38 +02:00
Fabien Potencier 0f51a54fc9 added support for dynamic and conditional inheritance ({% extends some_var %} and {% extends standalone ? minimum : base %}) 2010-06-09 23:05:45 +02:00
Fabien Potencier 8809a1cab1 changed as to = for the set tag and removed the need for as in short-notation of the block tag (closes #54) 2010-06-09 08:20:51 +02:00
Fabien Potencier 89edc52ae4 [doc] updated documentation 2010-06-08 16:48:05 +02:00
Fabien Potencier 67746ffa6f [doc] added hashes in the Literals paragraph 2010-06-08 08:27:18 +02:00
Fabien Potencier c9257f3ed2 [doc] updated tags and filters provided by the Core extension 2010-06-07 20:45:51 +02:00
Fabien Potencier d47902c7b9 fixed the for tag for large arrays (closes #64 - based on an idea from gwilym - aeb56f9f966bd23b77d35c87999be0606dbb3f47) 2010-06-07 11:04:23 +02:00
Fabien Potencier d46517fd32 fixed typo in doc (closes #63) 2010-06-07 10:12:55 +02:00
Fabien Potencier 56318ee4a8 made a big refactoring of Twig internals (and added a bunch of unit tests and phpdoc, fixes #53) 2010-06-03 08:12:58 +02:00
Fabien Potencier 28bbe6f2de renamed ignore_invalid_vars to strict_variables 2010-05-28 07:59:29 +02:00