Skip to content

Missing semicolon in Console Component example #2085

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 822 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
822 commits
Select commit Hold shift + click to select a range
a33a9c6
[#1709] Fixing flashbag template rendering in quick tour
weaverryan Sep 18, 2012
e03808c
Update components/event_dispatcher/introduction.rst
Sep 16, 2012
7aa94a2
Merge pull request #1714 from richardmiller/cleaning_up_di_terminology
weaverryan Sep 18, 2012
a9db208
Merge pull request #1719 from richardmiller/adding_info_on_twig_lint
weaverryan Sep 18, 2012
d33c890
Merge pull request #1720 from richardmiller/adding_info_on_router_match
weaverryan Sep 18, 2012
42ed2c6
Merge pull request #1724 from richardmiller/updating_cookbook_article…
weaverryan Sep 18, 2012
6365fde
updated documentation for the profiler usage in a functional test (re…
fabpot Sep 18, 2012
308c4a1
Merge pull request #1727 from symfony/profiler
weaverryan Sep 19, 2012
e753faa
Merge branch '2.0' into 2.1
weaverryan Sep 19, 2012
d06484c
Merge branch '2.1'
weaverryan Sep 19, 2012
0dcfe3c
Merge pull request #1598 from merk/luhn-validator
weaverryan Sep 22, 2012
d450a67
[#1598] Tweaks to new Luhn validator entry
weaverryan Sep 22, 2012
40a1fa3
Merge branch '2.0' into 2.1
weaverryan Sep 22, 2012
65f33b7
Merge branch '2.1'
weaverryan Sep 22, 2012
a10431e
removed extra "the" in text
jonathaningram Sep 20, 2012
da47606
Merge branch '2.0' into 2.1
weaverryan Sep 24, 2012
c893ed4
From adjective to adverb
greg0ire Sep 23, 2012
6fd1c27
Merge branch '2.1'
weaverryan Sep 24, 2012
b63750b
Merge branch '2.0' into 2.1
weaverryan Sep 29, 2012
ab0fb08
Merge branch '2.1'
weaverryan Sep 29, 2012
28e1113
Use isMethod instead of a direct comparison
acasademont Oct 2, 2012
052983f
[#1775] Changing to use the new Request::isMethod() when checking for…
weaverryan Oct 2, 2012
e741967
Merge branch '2.0' into 2.1
weaverryan Oct 3, 2012
c7ade79
Merge branch '2.1'
weaverryan Oct 3, 2012
41de7f3
Merge branch '2.0' into 2.1
weaverryan Oct 3, 2012
0dc7543
Update book/forms.rst
Sep 23, 2012
3803c0f
Merge branch '2.0' into 2.1
weaverryan Oct 3, 2012
65a9ff4
[Form][#1738] Updating block names and other changes for 2.1 compat
weaverryan Oct 3, 2012
7ee31a2
[Form][#1738] Tweaking more items in the form customizations
weaverryan Oct 3, 2012
4775365
[Form][#1738] Updating more form blocks for 2.1
weaverryan Oct 3, 2012
3d87527
Merge branch '2.0' into 2.1
weaverryan Oct 7, 2012
4a9d6a0
Update book/security.rst
weyandch Sep 25, 2012
5b7f8fb
Merge branch 'master' into 2.1
weaverryan Oct 7, 2012
d8ac9ba
Merge branch '2.0' into 2.1
weaverryan Oct 7, 2012
35c0255
Remove "s" from constraint as it's wrong path
tristanbes Sep 27, 2012
7009139
Merge branch '2.0' into 2.1
weaverryan Oct 7, 2012
3300ab3
This reverts an improper merge - master was merged into 2.1 by mistake.
weaverryan Oct 7, 2012
004a903
Update book/forms.rst
bicpi Oct 4, 2012
5333cb3
Merge branch '2.0' into 2.1
weaverryan Oct 8, 2012
ec30eb5
Remove extra word
andreia Oct 7, 2012
51f3862
Merge branch '2.0' into 2.1
fabpot Oct 8, 2012
4109ea8
Add the new enum node type in 2.1
jeanmonod Oct 17, 2012
c94e135
Merge remote-tracking branch 'origin/2.0' into 2.1
weaverryan Oct 17, 2012
9e9c00b
[doctrine] Removing special concern about debug mode in command task …
weaverryan Oct 17, 2012
09fda35
Merge branch '2.0' into 2.1
weaverryan Oct 17, 2012
a057523
[form] Updating latest form variables code for 2.1
weaverryan Oct 17, 2012
a031e32
Fixing a markup error
weaverryan Oct 17, 2012
f20a3d2
document the prototype_name option
Oct 8, 2012
a714de1
cs
Oct 8, 2012
bdf09d4
Specify protype_name option's first appearance
greg0ire Oct 12, 2012
0b268ee
[Cookbook][Routing] How to use Service Container parameters in your r…
alvarezmario Oct 19, 2012
f201e48
Fixed format (added colon in versinoadded block)
wouterj Oct 19, 2012
0196aaa
Merge branch '2.0' into 2.1
weaverryan Oct 23, 2012
30216b9
Merge branch 'cookbook_routing_service_container_parameters' of githu…
weaverryan Oct 23, 2012
a7a7ba8
[#1834] Tweaks to new entry about routing parameters
weaverryan Oct 23, 2012
7e0103b
Merge pull request #1835 from WouterJ/patch-8
weaverryan Oct 23, 2012
41fd4a7
Update components/http_foundation/session_configuration.rst
jahller Oct 21, 2012
f6890c9
Setting the option property_path to false was deprecated - use mapped
leonex-cs1 Oct 22, 2012
dc99acb
Option cascade_validation must be added to TaskType
dieisraels Oct 13, 2012
cd86546
[#1809] Adding more clarification to which file is being modified
weaverryan Oct 23, 2012
0e9ce76
Merge branch '2.0' into 2.1
weaverryan Oct 24, 2012
28ea82b
[#1806] Updating the new form extensions entry to 2.1 using #1691 and…
weaverryan Oct 24, 2012
6b9ca63
Merge branch '2.0' into 2.1
weaverryan Oct 24, 2012
5e32e8a
Fixed 'validation_constraint' deprecation
pylebecq Oct 12, 2012
606507c
Updated images for the new profiler/web debug toolbar
wouterj Oct 8, 2012
4a95fdb
Deleted welcome.jpg and replaced it with a PNG version
wouterj Oct 8, 2012
e321579
[quick_tour] Added note about the new toolbar and updated image link
wouterj Oct 8, 2012
7bb7521
[2.1] Edited JMSSecurityExtraBundle doc link Edit
wouterj Oct 27, 2012
1522f3c
Merge branch '2.0' into 2.1
weaverryan Oct 27, 2012
d3e63b3
Update reference/constraints/Image.rst
bicpi Oct 28, 2012
9bbc99f
Replace MinLength with Length
Oct 29, 2012
c588f8e
replace maxlength constraints with length equivalents
Oct 29, 2012
b7b0ef0
max_length can also be guessed from Length
Oct 29, 2012
63e2b3f
Fixing small markup issue
weaverryan Oct 31, 2012
9f7f31b
Merge branch '2.0' into 2.1
weaverryan Oct 31, 2012
293c7ea
[#1564] Pulling in a few more typo fixes from @pborreli
weaverryan Oct 31, 2012
ecdc8ea
Merge pull request #1826 from jeanmonod/new-enum-node-type
weaverryan Oct 31, 2012
60c85de
Merge branch '2.0' into 2.1
weaverryan Oct 31, 2012
8ceabb9
[#1782] Upgrading deployment details to 2.1
weaverryan Oct 31, 2012
5753fcc
Merge branch '2.0' into 2.1
weaverryan Oct 31, 2012
adafd32
[Cookbook] Adding a note about optimizing the class map autoloader th…
weaverryan Oct 31, 2012
d5de482
Merge branch '2.0' into 2.1
weaverryan Nov 1, 2012
61f62f1
[deploy] Adding note about needing to dump asset independently of cle…
weaverryan Nov 1, 2012
2703543
Merge pull request #1800 from WouterJ/updating_profiler_imgs
weaverryan Nov 2, 2012
9611c39
Merge branch '2.0' into 2.1
weaverryan Nov 3, 2012
d2d873d
Added missing session handlers
pgodel Oct 30, 2012
92c42c7
Removed duplicate NativeFileSessionHandler
pgodel Nov 1, 2012
2f59f6e
Merge branch '2.0' into 2.1
weaverryan Nov 3, 2012
9dda2bb
[#1881] Fixing bad call to getting flash messages in PHP
weaverryan Nov 3, 2012
678a7fe
[Book/installation] Fixed "image file not readable" warning
wouterj Nov 4, 2012
4f61b7f
add JsonResponse exemple
Nov 5, 2012
a296b69
Remove UniversalClassLoader from debugging recipe (composer autoload …
igorw Nov 6, 2012
4e3fcfa
Update cookbook/form/dynamic_form_generation.rst
loostro Nov 6, 2012
253a94c
Update cookbook/form/dynamic_form_generation.rst
sethunath Oct 28, 2012
0ea1297
Merge branch '2.0' into 2.1
weaverryan Nov 7, 2012
a0e2b5c
Update reference/constraints/Image.rst
bicpi Oct 28, 2012
c0410f9
Merge branch '2.0' into 2.1
weaverryan Nov 10, 2012
7787d1e
Merge branch 'patch-10' of github.com:WouterJ/symfony-docs into Woute…
weaverryan Nov 10, 2012
0862175
Update components/http_foundation/sessions.rst
jdreesen Nov 11, 2012
7c1685c
Update components/http_foundation/sessions.rst
jdreesen Nov 11, 2012
ce35025
Fixed function name
jdreesen Nov 12, 2012
674dfe1
Merge branch '2.0' into 2.1
weaverryan Nov 14, 2012
346e3ce
Merge branch '2.0' into 2.1
weaverryan Nov 14, 2012
8417549
[reference] Adding the DBAL keep_slave config option
weaverryan Nov 14, 2012
c318400
Allow & Force the 'em' option.
armetiz Nov 15, 2012
7b9733a
Changed function definition to match AbstractTypeExtension interface.
advancingu Nov 15, 2012
8b05034
Add comma
armetiz Nov 16, 2012
3a151ea
Merge branch 'remove_min_max_length_references_2.1' of github.com:gre…
weaverryan Nov 16, 2012
cb9c9d1
[#1864] Tweaking to remove more deprecated constraints
weaverryan Nov 16, 2012
feb9b22
[#1864] Removing a couple more references to duplicated constraints a…
weaverryan Nov 16, 2012
99ceb34
Merge branch '2.0' into 2.1
weaverryan Nov 16, 2012
fff4fdb
Added more info about no install artifacts
dlsniper Nov 18, 2012
96542c2
Merge pull request #1892 from WouterJ/fix_build_errors_21
weaverryan Nov 20, 2012
f64157e
Merge branch '2.0' into 2.1
weaverryan Nov 20, 2012
1629d49
Merge branch '2.0' into 2.1
weaverryan Nov 22, 2012
519b896
Merge branch '2.0' into 2.1
weaverryan Nov 22, 2012
3d23728
Merge pull request #1896 from kosssi/impoving_json_response
weaverryan Nov 22, 2012
b828837
Merge branch '2.0' into 2.1
weaverryan Nov 22, 2012
9b0f48c
[#1896] Refactoring the new JsonResponse docs into the HttpFoundation…
weaverryan Nov 22, 2012
948e29f
Merge pull request #1900 from igorw/debugging-no-classloader
weaverryan Nov 22, 2012
e57f148
[#1900] Removing more outdated references of using Symfony's autoload…
weaverryan Nov 22, 2012
ff94ec2
Merge pull request #1901 from loostro/patch-2
weaverryan Nov 22, 2012
116dba2
Fix reference to $session->set/get typo on p.21
m14t Nov 6, 2012
2f33b3f
Merge remote-tracking branch 'origin/2.1' into 2.1
weaverryan Nov 22, 2012
8b555c0
Update cookbook/form/create_form_type_extension.rst
kevinarcher Nov 8, 2012
b0eec98
Update cookbook/form/create_form_type_extension.rst
kevinarcher Nov 8, 2012
7b28d4a
Update cookbook/form/create_form_type_extension.rst
kevinarcher Nov 8, 2012
2d7a589
Update cookbook/form/create_form_type_extension.rst
kevinarcher Nov 8, 2012
be1c7b4
Update cookbook/form/create_form_type_extension.rst
kevinarcher Nov 8, 2012
52f1f65
Merge branch '2.0' into 2.1
weaverryan Nov 22, 2012
f52e2f1
Merge branch '2.0' into 2.1
weaverryan Nov 22, 2012
da37645
Merge pull request #1913 from jdreesen/patch-1
weaverryan Nov 22, 2012
50b7692
Merge pull request #1917 from jdreesen/patch-3
weaverryan Nov 22, 2012
1bce51b
Merge pull request #1914 from jdreesen/patch-2
weaverryan Nov 23, 2012
c541d4d
Merge pull request #1923 from armetiz/patch-1
weaverryan Nov 23, 2012
6fa2da7
Merge pull request #1928 from advancingu/patch-3
weaverryan Nov 23, 2012
de1c798
Fixed typos
pborreli Nov 16, 2012
e02913e
Merge branch 'no-install-artifacts' of github.com:dlsniper/symfony-do…
weaverryan Nov 23, 2012
acb42f7
[#1935] Making note about --prefer-dist shorter in the installation c…
weaverryan Nov 23, 2012
5c24df5
Merge branch '2.0' into 2.1
weaverryan Nov 23, 2012
a3fd21a
[#1952] Changing to getManager for Doctrine
weaverryan Nov 23, 2012
591f2dd
Merge branch '2.0' into 2.1
weaverryan Nov 23, 2012
40c83db
[#1916] Adding back details that are new in 2.1 - partially taken fro…
weaverryan Nov 23, 2012
d93407d
[#1916] Formatting tweaks
weaverryan Nov 23, 2012
7aa9b9e
add "hasser" tip for boolean getters
Nov 24, 2012
b69bbec
Removed 2.0 only functions
wouterj Nov 24, 2012
fcb1bce
Added new functions
wouterj Nov 24, 2012
1e84ae9
Added Tests
wouterj Nov 24, 2012
d3cfc16
Added humanize filter
wouterj Nov 24, 2012
ee49483
Added versionadded blocks
wouterj Nov 24, 2012
4ae613e
Reducing some code sample line lengths to stop horizontal scrolling
richardmiller-zz Nov 24, 2012
7b746e8
Merge branch '2.0' into 2.1
weaverryan Nov 26, 2012
36d8ab4
[#1947] Fixing PdoSessionStorage -> PdoSessionHandler per @andreia
weaverryan Nov 26, 2012
5c1bcf8
Merge pull request #1958 from bicpi/add_hasser_tip_for_boolean_getters
weaverryan Nov 26, 2012
281b6ce
[#1958] Adding versionadded note
weaverryan Nov 26, 2012
22e3305
Merge branch '2.0' into 2.1
weaverryan Nov 26, 2012
d3ad7fd
Merge pull request #1970 from richardmiller/fixing_code_line_lengths
weaverryan Nov 26, 2012
2566445
[#1933] Fixing bad chmod call
weaverryan Nov 26, 2012
c70479a
Document the mapped formType option
Nov 26, 2012
930d9ea
whitespace
Nov 26, 2012
e700325
Merge pull request #1962 from WouterJ/twig_ref_21
weaverryan Nov 26, 2012
6a21206
[#1962] Slight language tweak
weaverryan Nov 26, 2012
b46a025
Merge branch '2.0' into 2.1
weaverryan Nov 26, 2012
e58d132
fix copy paste mistake
Nov 26, 2012
0ac65bb
Point out what is deprecated
Nov 27, 2012
9faeb49
Sentences should end with a dot.
Nov 27, 2012
7941f8e
Added note about Service Container parameters inside routes
wouterj Nov 27, 2012
9e2363d
Merge pull request #1973 from greg0ire/document_mapped
weaverryan Nov 28, 2012
019a17f
Merge pull request #1980 from WouterJ/add_note_route_di_params
weaverryan Nov 28, 2012
56d7ff0
[#1980] Slight reword
weaverryan Nov 28, 2012
8b4919a
Changing the getVar method to get (only valid for 2.1)
Sgoettschkes Nov 28, 2012
6867e4e
Fix use statements
johnkary Nov 29, 2012
8e9d04f
Remove references to deprecated DataEvent and FilterDataEvent
johnkary Nov 29, 2012
229dd4f
Changing description of symfony installation to composer
Sgoettschkes Nov 30, 2012
31a5a62
Adding a link to composer and mentioning the installation of it.
Sgoettschkes Dec 1, 2012
9a77129
Merge pull request #1983 from Sgoettschkes/issue1906
weaverryan Dec 1, 2012
ee3dfbd
[#1983][#1906] Fixing bad prototype vars method calls on FormView
weaverryan Dec 1, 2012
7456e3e
Merge branch '2.0' into 2.1
weaverryan Dec 1, 2012
5bbc322
[#1987] Changing getEntityManager to getManager
weaverryan Dec 1, 2012
f9f0ed1
Merge pull request #1990 from johnkary/fixDeprecatedFormEvents
weaverryan Dec 1, 2012
16333e1
Bugfixing a few typos; Adding install command for composer
Sgoettschkes Dec 2, 2012
cc9d618
Remove the reqire on app/autoload from code-example
Sgoettschkes Dec 2, 2012
5986e2b
Changing text which refers to the old autoloading mechanism
Sgoettschkes Dec 2, 2012
fc3e6b9
Changing text which refers to the old app/autoload.php to mention "th…
Sgoettschkes Dec 2, 2012
e3a9757
Removing wrong mentioning of a `src/autload.php`
Sgoettschkes Dec 2, 2012
fd7a3f4
Rewriting the autoload section to include composer
Sgoettschkes Dec 2, 2012
2250f60
Reverting changes which remove mentioning of the app/autoload.php
Sgoettschkes Dec 3, 2012
e657fe2
Update components/http_foundation/introduction.rst
Cangit Dec 3, 2012
3f9a3a8
Merge pull request #1997 from Cangit/patch-1
weaverryan Dec 3, 2012
c2978e3
Partially reverting some changes and improving the original content
Sgoettschkes Dec 3, 2012
fd43e33
Fixing sysmte => system typo
Sgoettschkes Dec 4, 2012
760d20e
Fixed wrong syntax in book/performance.rst
Dec 6, 2012
a03f06f
Merge branch '2.0' into 2.1
weaverryan Dec 6, 2012
fee85dc
Fix incorrect method name
pierredup Dec 11, 2012
a6a8d90
Merge pull request #2017 from pierredup/locale_fix
weaverryan Dec 13, 2012
44a963f
Merge branch '2.0' into 2.1
weaverryan Dec 13, 2012
4e23fee
Add missing xml reference examples. Fix MaxLength example
l3l0 Dec 15, 2012
1457519
Added convenience link
Dec 15, 2012
8b3f102
Merge pull request #1993 from Sgoettschkes/issue1951
weaverryan Dec 16, 2012
e3c71c1
[#1993] Minor syntax tweak
weaverryan Dec 16, 2012
dc40231
Merge pull request #1994 from Sgoettschkes/composer_links
weaverryan Dec 16, 2012
fe95b26
[Components] Addition of a tiny comment
weaverryan Dec 16, 2012
c6cb402
Merge pull request #1996 from Sgoettschkes/issue1176
weaverryan Dec 16, 2012
93c09e5
Merge remote-tracking branch 'origin/2.1' into 2.1
weaverryan Dec 16, 2012
da4a62a
[#1996] Fixing a few minor syntax issues
weaverryan Dec 16, 2012
1ddc3d8
Merge branch '2.0' into 2.1
weaverryan Dec 16, 2012
e360b2c
Merge branch '2.0' into 2.1
weaverryan Dec 16, 2012
61cfbfe
Merge pull request #2028 from drak/patch-5
weaverryan Dec 16, 2012
816bba8
Merge pull request #2027 from l3l0/add-some-missing-xml-constraints-r…
weaverryan Dec 16, 2012
73daebf
Merge branch '2.0' into 2.1
weaverryan Dec 16, 2012
0ce4b70
Merge branch '2.0' into 2.1
weaverryan Dec 17, 2012
1b236fb
UserPassword
franmomu Dec 15, 2012
6396da3
Fixed example parameters with mixed INI and Yaml.
iamdto Dec 17, 2012
35da60d
Update cookbook/doctrine/registration_form.rst
tamirvs Dec 17, 2012
19550c8
Merge pull request #2039 from iamdto/parameters-example
weaverryan Dec 18, 2012
db71246
How to add a new package and update .lock file
gajdaw Dec 18, 2012
2c4e3f0
Fix
gajdaw Dec 18, 2012
54f8557
Merge pull request #2046 from gajdaw/update-2.1
weaverryan Dec 19, 2012
67bdae4
[#2046] Minor syntax and language tweaks
weaverryan Dec 19, 2012
2c2d4ff
Merge branch '2.0' into 2.1
weaverryan Dec 19, 2012
ac44303
Added missing xml configuration examples for validation constraints
l3l0 Dec 19, 2012
99da812
Improved Form Validation Docs
rdohms Dec 22, 2012
41db041
Fixing standards.
rdohms Dec 22, 2012
6878140
Merge branch '2.0' into 2.1
weaverryan Dec 23, 2012
ef230cc
Merge branch '2.0' into 2.1
weaverryan Dec 24, 2012
eb83f8c
[#2057] Updating some syntax for the Twig render tags without the "with"
weaverryan Dec 24, 2012
b7d4d46
[#2057] Fixing another reference to the old render syntax
weaverryan Dec 24, 2012
6cf091d
Merge branch '2.0' into 2.1
weaverryan Dec 24, 2012
6c9dc44
Merge branch '2.0' into 2.1
weaverryan Dec 26, 2012
ec46d85
Merge branch '2.0' into 2.1
weaverryan Dec 26, 2012
568392f
Merge branch '2.0' into 2.1
weaverryan Dec 26, 2012
84be0e1
Merge branch '2.0' into 2.1
weaverryan Dec 26, 2012
9716567
Fixing syntax error
weaverryan Dec 26, 2012
7c7a8e7
Fixing code block name
rdohms Dec 27, 2012
8da7824
Changed installation chapter
wouterj Dec 29, 2012
8aeb9cf
Merge pull request #2058 from rdohms/form-validation-update
weaverryan Dec 30, 2012
bc223ac
[#2058] Tweaking constraints versus validation_constraint note per @Stof
weaverryan Dec 30, 2012
ca48e3d
[#2058] Refactoring how to add validation to a form, using the `const…
weaverryan Dec 30, 2012
d47a3c7
[#2058] Adding note about where to find the "constraints" form option…
weaverryan Dec 30, 2012
0c8840b
Merge branch '2.0' into 2.1
weaverryan Dec 30, 2012
2d23d72
[#2064] Updating the HttpKernel component documentation for Symfony 2.1
weaverryan Dec 30, 2012
dc9cb77
Added data transformers types image
Dec 24, 2012
700f72d
Merge branch '2.0' into 2.1
weaverryan Dec 30, 2012
11a4e97
Merge pull request #2069 from WouterJ/patch-30
weaverryan Dec 30, 2012
64e720a
Merge pull request #2053 from l3l0/add-some-more-missing-xml-constrai…
weaverryan Dec 30, 2012
2ea1333
Merge branch '2.0' into 2.1
weaverryan Dec 30, 2012
4be1ae1
Merge branch '2.0' into 2.1
weaverryan Dec 30, 2012
801644d
Merge branch '2.0' into 2.1
weaverryan Dec 30, 2012
180bf50
Merge branch '2.0' into 2.1
weaverryan Dec 31, 2012
51ea37e
Missing semicolon
Dec 31, 2012
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
30 changes: 16 additions & 14 deletions book/controller.rst
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ working with forms, for example::
{
$form = $this->createForm(...);

$form->bindRequest($request);
$form->bind($request);
// ...
}

Expand Down Expand Up @@ -630,8 +630,8 @@ from any controller::
// in another controller for another request
$foo = $session->get('foo');

// set the user locale
$session->setLocale('fr');
// use a default value if the key doesn't exist
$filters = $session->get('filters', array());

These attributes will remain on the user for the remainder of that user's
session.
Expand All @@ -653,14 +653,11 @@ For example, imagine you're processing a form submit::
{
$form = $this->createForm(...);

$form->bindRequest($this->getRequest());
$form->bind($this->getRequest());
if ($form->isValid()) {
// do some sort of processing

$this->get('session')->setFlash(
'notice',
'Your changes were saved!'
);
$this->get('session')->getFlashBag()->add('notice', 'Your changes were saved!');

return $this->redirect($this->generateUrl(...));
}
Expand All @@ -679,19 +676,19 @@ the ``notice`` message:

.. code-block:: html+jinja

{% if app.session.hasFlash('notice') %}
{% for flashMessage in app.session.flashbag.get('notice') %}
<div class="flash-notice">
{{ app.session.flash('notice') }}
{{ flashMessage }}
</div>
{% endif %}
{% endfor %}

.. code-block:: php

<?php if ($view['session']->hasFlash('notice')): ?>
<?php foreach ($view['session']->getFlash('notice') as $message): ?>
<div class="flash-notice">
<?php echo $view['session']->getFlash('notice') ?>
<?php echo "<div class='flash-error'>$message</div>" ?>
</div>
<?php endif; ?>
<?php endforeach; ?>

By design, flash messages are meant to live for exactly one request (they're
"gone in a flash"). They're designed to be used across redirects exactly as
Expand Down Expand Up @@ -723,6 +720,11 @@ headers and content that's sent back to the client::
header names are normalized so that using ``Content-Type`` is equivalent
to ``content-type`` or even ``content_type``.

.. tip::

There is also a special :class:`Symfony\\Component\\HttpFoundation\\JsonResponse`
class that helps return JSON responses. See :ref:`component-http-foundation-json-response`.

.. index::
single: Controller; Request object

Expand Down
59 changes: 28 additions & 31 deletions book/doctrine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,23 @@ Configuring the Database

Before you really begin, you'll need to configure your database connection
information. By convention, this information is usually configured in an
``app/config/parameters.ini`` file:
``app/config/parameters.yml`` file:

.. code-block:: ini
.. code-block:: yaml

; app/config/parameters.ini
[parameters]
database_driver = pdo_mysql
database_host = localhost
database_name = test_project
database_user = root
database_password = password
# app/config/parameters.yml
parameters:
database_driver: pdo_mysql
database_host: localhost
database_name: test_project
database_user: root
database_password: password

# ...

.. note::

Defining the configuration via ``parameters.ini`` is just a convention.
Defining the configuration via ``parameters.yml`` is just a convention.
The parameters defined in that file are referenced by the main configuration
file when setting up Doctrine:

Expand Down Expand Up @@ -406,7 +408,7 @@ of the bundle:
$product->setPrice('19.99');
$product->setDescription('Lorem ipsum dolor');

$em = $this->getDoctrine()->getEntityManager();
$em = $this->getDoctrine()->getManager();
$em->persist($product);
$em->flush();

Expand Down Expand Up @@ -553,7 +555,7 @@ you have a route that maps a product id to an update action in a controller::

public function updateAction($id)
{
$em = $this->getDoctrine()->getEntityManager();
$em = $this->getDoctrine()->getManager();
$product = $em->getRepository('AcmeStoreBundle:Product')->find($id);

if (!$product) {
Expand Down Expand Up @@ -619,7 +621,7 @@ Imagine that you want to query for products, but only return products that
cost more than ``19.99``, ordered from cheapest to most expensive. From inside
a controller, do the following::

$em = $this->getDoctrine()->getEntityManager();
$em = $this->getDoctrine()->getManager();
$query = $em->createQuery(
'SELECT p FROM AcmeStoreBundle:Product p WHERE p.price > :price ORDER BY p.price ASC'
)->setParameter('price', '19.99');
Expand Down Expand Up @@ -795,7 +797,7 @@ ordered alphabetically.

You can use this new method just like the default finder methods of the repository::

$em = $this->getDoctrine()->getEntityManager();
$em = $this->getDoctrine()->getManager();
$products = $em->getRepository('AcmeStoreBundle:Product')
->findAllOrderedByName();

Expand Down Expand Up @@ -988,7 +990,7 @@ Now you can see this new code in action! Imagine you're inside a controller::
// relate this product to the category
$product->setCategory($category);

$em = $this->getDoctrine()->getEntityManager();
$em = $this->getDoctrine()->getManager();
$em->persist($category);
$em->persist($product);
$em->flush();
Expand Down Expand Up @@ -1379,12 +1381,7 @@ Some notable or interesting tasks include:

.. code-block:: bash

$ php app/console doctrine:ensure-production-settings --no-debug --env=prod

.. caution::

Don't forget to add the ``--no-debug`` switch, because the debug flag is
always set to true, even if the environment is set to ``prod``.
$ php app/console doctrine:ensure-production-settings --env=prod

* ``doctrine:mapping:import`` - allows Doctrine to introspect an existing
database and create mapping information. For more information, see
Expand Down Expand Up @@ -1425,14 +1422,14 @@ For more information about Doctrine, see the *Doctrine* section of the

.. _`Doctrine`: http://www.doctrine-project.org/
.. _`MongoDB`: http://www.mongodb.org/
.. _`Basic Mapping Documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/basic-mapping.html
.. _`Query Builder`: http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/query-builder.html
.. _`Doctrine Query Language`: http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/dql-doctrine-query-language.html
.. _`Association Mapping Documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/association-mapping.html
.. _`Basic Mapping Documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html
.. _`Query Builder`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/query-builder.html
.. _`Doctrine Query Language`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/dql-doctrine-query-language.html
.. _`Association Mapping Documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/association-mapping.html
.. _`DateTime`: http://php.net/manual/en/class.datetime.php
.. _`Mapping Types Documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/basic-mapping.html#doctrine-mapping-types
.. _`Property Mapping documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/basic-mapping.html#property-mapping
.. _`Lifecycle Events documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/events.html#lifecycle-events
.. _`Reserved SQL keywords documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/basic-mapping.html#quoting-reserved-words
.. _`Persistent classes`: http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/basic-mapping.html#persistent-classes
.. _`Property Mapping`: http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/basic-mapping.html#property-mapping
.. _`Mapping Types Documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html#doctrine-mapping-types
.. _`Property Mapping documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html#property-mapping
.. _`Lifecycle Events documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html#lifecycle-events
.. _`Reserved SQL keywords documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html#quoting-reserved-words
.. _`Persistent classes`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html#persistent-classes
.. _`Property Mapping`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html#property-mapping
Loading