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

Minor fixes for Quick Tour#16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
sebio wants to merge1 commit intosymfony:masterfromsebio:master
Closed
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletionsquick_tour/the_big_picture.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -100,9 +100,9 @@ very easy).

.. tip::
The sandbox defaults to YAML, but you can easily switch to XML or PHP by
editing the ``config/AppKernel.php`` file. You can switch now by looking at
thebottom of ``config/AppKernel.php`` for instructions (the tutorials show
theconfiguration for all supported formats).
editing the ``app/AppKernel.php`` file. You can switch now by looking at the
bottom of ``app/AppKernel.php`` for instructions (the tutorials show the
configuration for all supported formats).

.. index::
single: Routing
Expand Down
12 changes: 6 additions & 6 deletionsquick_tour/the_controller.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -183,9 +183,9 @@ the ``router`` helper before. It takes the route name and an array of parameters
as arguments and returns the associated friendly URL.

You can also easily forward the action to another one with the ``forward()``
method. As for the ``$view['actions']`` helper, it makes an internal
sub-request, but itreturns the ``Response`` object to allow for further
modification if the needarises::
method. As for the ``actions`` helper, it makes an internal sub-request, but it
returns the ``Response`` object to allow for further modification if the need
arises::

$response = $this->forward('HelloBundle:Hello:fancy', array('name' => $name, 'color' => 'green'));

Expand All@@ -210,7 +210,7 @@ to the ``Request`` object::

$request->request->get('page'); // get a $_POST parameter

In a template, you can also access therequest object via the ``request``
In a template, you can also access the``Request`` object via the ``request``
helper:

.. code-block:: html+php
Expand All@@ -234,7 +234,7 @@ from any controller::
// in another controller for another request
$foo = $this['request']->getSession()->get('foo');

//get/set the userculture
// set the userlocale
$this['request']->getSession()->setLocale('fr');

You can also store small messages that will only be available for the very
Expand All@@ -251,5 +251,5 @@ Final Thoughts

That's all there is to it, and I'm not even sure we have spent the allocated
10 minutes. In the previous part, we saw how to extend the templating system
with helpers. But everything can extended or replaced in Symfony2 with
with helpers. But everything canbeextended or replaced in Symfony2 with
bundles. That's the topic of the next part of this tutorial.

[8]ページ先頭

©2009-2025 Movatter.jp