Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf07830c

Browse files
committed
Merge pull request#2641 from bamarni/patch-7
[Twig] removed unneeded configuration
2 parentsa103278 +85a00c7 commitf07830c

File tree

1 file changed

+1
-35
lines changed

1 file changed

+1
-35
lines changed

‎book/templating.rst‎

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,43 +1340,9 @@ in a JavaScript string, use the ``js`` context:
13401340
Debugging
13411341
---------
13421342

1343-
..versionadded::2.0.9
1344-
This feature is available as of Twig ``1.5.x``, which was first shipped
1345-
with Symfony 2.0.9.
1346-
13471343
When using PHP, you can use ``var_dump()`` if you need to quickly find the
13481344
value of a variable passed. This is useful, for example, inside your controller.
1349-
The same can be achieved when using Twig by using the debug extension. This
1350-
needs to be enabled in the config:
1351-
1352-
..configuration-block::
1353-
1354-
..code-block::yaml
1355-
1356-
# app/config/config.yml
1357-
services:
1358-
acme_hello.twig.extension.debug:
1359-
class:Twig_Extension_Debug
1360-
tags:
1361-
-{ name: 'twig.extension' }
1362-
1363-
..code-block::xml
1364-
1365-
<!-- app/config/config.xml-->
1366-
<services>
1367-
<serviceid="acme_hello.twig.extension.debug"class="Twig_Extension_Debug">
1368-
<tagname="twig.extension" />
1369-
</service>
1370-
</services>
1371-
1372-
..code-block::php
1373-
1374-
// app/config/config.php
1375-
use Symfony\Component\DependencyInjection\Definition;
1376-
1377-
$definition = new Definition('Twig_Extension_Debug');
1378-
$definition->addTag('twig.extension');
1379-
$container->setDefinition('acme_hello.twig.extension.debug', $definition);
1345+
The same can be achieved when using Twig thanks to the the debug extension.
13801346

13811347
Template parameters can then be dumped using the ``dump`` function:
13821348

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp