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
563023c7
Commit
563023c7
authored
Sep 22, 2011
by
Fabien Potencier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bad merge
parent
69b47da9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
9 deletions
+2
-9
doc/providers/twig.rst
doc/providers/twig.rst
+1
-8
doc/usage.rst
doc/usage.rst
+1
-1
No files found.
doc/providers/twig.rst
View file @
563023c7
...
@@ -66,14 +66,7 @@ In any Twig template, the ``app`` variable refers to the Application object.
...
@@ -66,14 +66,7 @@ In any Twig template, the ``app`` variable refers to the Application object.
So you can access any services from within your view. For example to access
So you can access any services from within your view. For example to access
``$app['request']->getHost()``, just put this in your template:
``$app['request']->getHost()``, just put this in your template:
<<<<<<< HEAD
.. code-block:: jinja
.. code-block:: jinja
=======
The TwigServiceProvider also registers the application as a global
named ``app``. So you can access any services from within your
view. For example to access ``$app['request']->getHost()``,
just put this in your template:
>>>>>>> renamed *Provider classes to *ServiceProvider
{{ app.request.host }}
{{ app.request.host }}
...
@@ -84,7 +77,7 @@ from a template:
...
@@ -84,7 +77,7 @@ from a template:
{{ render('/sidebar') }}
{{ render('/sidebar') }}
{# or if you are also using UrlGenerator
Extension
#}
{# or if you are also using UrlGenerator
ServiceProvider
#}
{{ render(path('sidebar')) }}
{{ render(path('sidebar')) }}
For more information, check out the `Twig documentation
For more information, check out the `Twig documentation
...
...
doc/usage.rst
View file @
563023c7
...
@@ -158,7 +158,7 @@ It is pretty straightforward.
...
@@ -158,7 +158,7 @@ It is pretty straightforward.
.. note::
.. note::
There is a `Swiftmailer
Extension <extension
s/swiftmailer>` included
There is a `Swiftmailer
ServiceProvider <provider
s/swiftmailer>` included
that you can use instead of ``mail()``.
that you can use instead of ``mail()``.
The current ``request`` is automatically injected by Silex to the Closure
The current ``request`` is automatically injected by Silex to the Closure
...
...
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