Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
5ca81b04
Commit
5ca81b04
authored
Jun 15, 2012
by
Fabien Potencier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed doc
parent
d89cbcd9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
doc/changelog.rst
doc/changelog.rst
+2
-2
doc/providers/twig.rst
doc/providers/twig.rst
+2
-2
No files found.
doc/changelog.rst
View file @
5ca81b04
...
@@ -12,11 +12,11 @@ Changelog
...
@@ -12,11 +12,11 @@ Changelog
After::
After::
$app['twig'] = $app->extend('twig', function($twig, $app) {
$app['twig'] = $app->
share($app->
extend('twig', function($twig, $app) {
// do something
// do something
return $twig;
return $twig;
});
})
)
;
* **2012-06-13**: Added a route ``before`` middleware
* **2012-06-13**: Added a route ``before`` middleware
...
...
doc/providers/twig.rst
View file @
5ca81b04
...
@@ -126,12 +126,12 @@ Customization
...
@@ -126,12 +126,12 @@ Customization
You can configure the Twig environment before using it by extending the
You can configure the Twig environment before using it by extending the
``twig`` service::
``twig`` service::
$app['twig'] = $app->extend('twig', function($twig, $app) {
$app['twig'] = $app->
share($app->
extend('twig', function($twig, $app) {
$twig->addGlobal('pi', 3.14);
$twig->addGlobal('pi', 3.14);
$twig->addFilter('levenshtein', new \Twig_Filter_Function('levenshtein'));
$twig->addFilter('levenshtein', new \Twig_Filter_Function('levenshtein'));
return $twig;
return $twig;
});
})
)
;
For more information, check out the `Twig documentation
For more information, check out the `Twig documentation
<http://twig.sensiolabs.org>`_.
<http://twig.sensiolabs.org>`_.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment