Skip to content

Commit e40733d

Browse files
committed
Merge branch '2.4'
2 parents 450146e + 15b813f commit e40733d

File tree

8 files changed

+117
-60
lines changed

8 files changed

+117
-60
lines changed

book/installation.rst

+9
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,15 @@ If there are any issues, correct them now before moving on.
269269

270270
Note that using the ACL is recommended when you have access to them
271271
on your server because changing the umask is not thread-safe.
272+
273+
**4. Use the same user for the CLI and the web server**
274+
275+
In development environments, it is a common practice to use the same unix
276+
user for the CLI and the web server because it avoids any of these permissions
277+
issues when setting up new projects. This can be done by editing your web server
278+
configuration (e.g. commonly httpd.conf or apache2.conf for Apache) and setting
279+
its user to be the same as your CLI user (e.g. for Apache, update the User
280+
and Group values).
272281

273282
When everything is fine, click on "Go to the Welcome page" to request your
274283
first "real" Symfony2 webpage:

book/routing.rst

+23-25
Original file line numberDiff line numberDiff line change
@@ -1268,29 +1268,6 @@ In an upcoming section, you'll learn how to generate URLs from inside templates.
12681268
12691269
For more information, see the documentation for that bundle.
12701270

1271-
.. index::
1272-
single: Routing; Absolute URLs
1273-
1274-
Generating Absolute URLs
1275-
~~~~~~~~~~~~~~~~~~~~~~~~
1276-
1277-
By default, the router will generate relative URLs (e.g. ``/blog``). To generate
1278-
an absolute URL, simply pass ``true`` to the third argument of the ``generate()``
1279-
method::
1280-
1281-
$this->get('router')->generate('blog_show', array('slug' => 'my-blog-post'), true);
1282-
// http://www.example.com/blog/my-blog-post
1283-
1284-
.. note::
1285-
1286-
The host that's used when generating an absolute URL is the host of
1287-
the current ``Request`` object. This is detected automatically based
1288-
on server information supplied by PHP. When generating absolute URLs for
1289-
scripts run from the command line, you'll need to manually set the desired
1290-
host on the ``RequestContext`` object::
1291-
1292-
$this->get('router')->getContext()->setHost('www.example.com');
1293-
12941271
.. index::
12951272
single: Routing; Generating URLs in a template
12961273

@@ -1303,7 +1280,7 @@ But if you pass extra ones, they will be added to the URI as a query string::
13031280
$this->get('router')->generate('blog', array('page' => 2, 'category' => 'Symfony'));
13041281
// /blog/2?category=Symfony
13051282

1306-
Generating URLs from a template
1283+
Generating URLs from a Template
13071284
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13081285

13091286
The most common place to generate a URL is from within a template when linking
@@ -1326,7 +1303,20 @@ a template helper function:
13261303
Read this blog post.
13271304
</a>
13281305

1329-
Absolute URLs can also be generated.
1306+
.. index::
1307+
single: Routing; Absolute URLs
1308+
1309+
Generating Absolute URLs
1310+
~~~~~~~~~~~~~~~~~~~~~~~~
1311+
1312+
By default, the router will generate relative URLs (e.g. ``/blog``). From
1313+
a controller, simply pass ``true`` to the third argument of the ``generateUrl()``
1314+
method::
1315+
1316+
$this->generateUrl('blog_show', array('slug' => 'my-blog-post'), true);
1317+
// http://www.example.com/blog/my-blog-post
1318+
1319+
From a template, it looks like this:
13301320

13311321
.. configuration-block::
13321322

@@ -1344,6 +1334,14 @@ Absolute URLs can also be generated.
13441334
Read this blog post.
13451335
</a>
13461336

1337+
.. note::
1338+
1339+
The host that's used when generating an absolute URL is the host of
1340+
the current ``Request`` object. This is detected automatically. But if
1341+
you generate absolute URLs for scripts run from the command line, this
1342+
won't work. But don't worry! Just see :doc:`/cookbook/console/sending_emails`
1343+
for details.
1344+
13471345
Summary
13481346
-------
13491347

cookbook/bundles/extension.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ The second method has several specific advantages:
9292
.. seealso::
9393

9494
For parameter handling within a Dependency Injection class see
95-
:doc:`</cookbook/configuration/using_parameters_in_dic>`.
95+
:doc:`/cookbook/configuration/using_parameters_in_dic`.
9696

9797
.. index::
9898
single: Bundle; Extension

cookbook/routing/service_container_parameters.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,4 +128,4 @@ path):
128128
.. seealso::
129129

130130
For parameter handling within a Dependency Injection class see
131-
:doc:`</cookbook/configuration/using_parameters_in_dic>`.
131+
:doc:`/cookbook/configuration/using_parameters_in_dic`.

reference/forms/types/button.rst

+10-11
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,24 @@ A simple, non-responsive button.
1212
+----------------------+----------------------------------------------------------------------+
1313
| Rendered as | ``button`` tag |
1414
+----------------------+----------------------------------------------------------------------+
15-
| Options | - `attr`_ |
16-
| | - `disabled`_ |
15+
| Inherited | - `attr`_ |
16+
| options | - `disabled`_ |
1717
| | - `label`_ |
1818
| | - `translation_domain`_ |
1919
+----------------------+----------------------------------------------------------------------+
20-
| Overridden options | - `auto_initialize`_ |
21-
+----------------------+----------------------------------------------------------------------+
2220
| Parent type | none |
2321
+----------------------+----------------------------------------------------------------------+
2422
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\ButtonType` |
2523
+----------------------+----------------------------------------------------------------------+
2624

27-
Options
28-
-------
25+
Inherited options
26+
-----------------
27+
28+
The following options are defined in the
29+
:class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\BaseType` class.
30+
The ``BaseType`` class is the parent class for both the ``button`` type and
31+
the :doc:`form type </reference/forms/types/form>`, but it is not part of
32+
the form type tree (i.e. it can not be used as a form type on its own).
2933

3034
.. include:: /reference/forms/types/options/button_attr.rst.inc
3135

@@ -34,8 +38,3 @@ Options
3438
.. include:: /reference/forms/types/options/button_label.rst.inc
3539

3640
.. include:: /reference/forms/types/options/button_translation_domain.rst.inc
37-
38-
Overridden Options
39-
------------------
40-
41-
.. include:: /reference/forms/types/options/button_auto_initialize.rst.inc

reference/forms/types/form.rst

+65-13
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,47 @@
44
form Field Type
55
===============
66

7-
See :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType`.
8-
97
The ``form`` type predefines a couple of options that are then available
10-
on all fields.
8+
on all types for which ``form`` is the parent type.
9+
10+
+-----------+--------------------------------------------------------------------+
11+
| Options | - `compound`_ |
12+
| | - `data`_ |
13+
| | - `data_class`_ |
14+
| | - `empty_data`_ |
15+
| | - `required`_ |
16+
| | - `label_attr`_ |
17+
| | - `constraints`_ |
18+
| | - `cascade_validation`_ |
19+
| | - `read_only`_ |
20+
| | - `trim`_ |
21+
| | - `mapped`_ |
22+
| | - `property_path`_ |
23+
| | - `max_length`_ |
24+
| | - `by_reference`_ |
25+
| | - `error_bubbling`_ |
26+
| | - `inherit_data`_ |
27+
| | - `error_mapping`_ |
28+
| | - `invalid_message`_ |
29+
| | - `invalid_message_parameters`_ |
30+
| | - `extra_fields_message`_ |
31+
| | - `post_max_size_message`_ |
32+
| | - `pattern`_ |
33+
+-----------+--------------------------------------------------------------------+
34+
| Inherited | - `block_name`_ |
35+
| options | - `disabled`_ |
36+
| | - `label`_ |
37+
| | - `attr`_ |
38+
| | - `translation_domain`_ |
39+
| | - `auto_initialize`_ |
40+
+-----------+--------------------------------------------------------------------+
41+
| Parent | none |
42+
+-----------+--------------------------------------------------------------------+
43+
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType` |
44+
+-----------+--------------------------------------------------------------------+
45+
46+
Options
47+
-------
1148

1249
.. include:: /reference/forms/types/options/data.rst.inc
1350

@@ -25,8 +62,6 @@ on all fields.
2562

2663
.. include:: /reference/forms/types/options/required.rst.inc
2764

28-
.. include:: /reference/forms/types/options/label.rst.inc
29-
3065
.. include:: /reference/forms/types/options/label_attr.rst.inc
3166

3267
.. include:: /reference/forms/types/options/constraints.rst.inc
@@ -35,20 +70,12 @@ on all fields.
3570

3671
.. include:: /reference/forms/types/options/read_only.rst.inc
3772

38-
.. include:: /reference/forms/types/options/disabled.rst.inc
39-
4073
.. include:: /reference/forms/types/options/trim.rst.inc
4174

4275
.. include:: /reference/forms/types/options/mapped.rst.inc
4376

4477
.. include:: /reference/forms/types/options/property_path.rst.inc
4578

46-
.. include:: /reference/forms/types/options/attr.rst.inc
47-
48-
.. include:: /reference/forms/types/options/translation_domain.rst.inc
49-
50-
.. include:: /reference/forms/types/options/block_name.rst.inc
51-
5279
.. _reference-form-option-max_length:
5380

5481
.. include:: /reference/forms/types/options/max_length.rst.inc
@@ -72,3 +99,28 @@ on all fields.
7299
.. _reference-form-option-pattern:
73100

74101
.. include:: /reference/forms/types/options/pattern.rst.inc
102+
103+
.. include:: /reference/forms/types/options/action.rst.inc
104+
105+
.. include:: /reference/forms/types/options/method.rst.inc
106+
107+
Inherited options
108+
-----------------
109+
110+
The following options are defined in the
111+
:class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\BaseType` class.
112+
The ``BaseType`` class is the parent class for both the ``form`` type and
113+
the :doc:`button type </reference/forms/types/button>`, but it is not part
114+
of the form type tree (i.e. it can not be used as a form type on its own).
115+
116+
.. include:: /reference/forms/types/options/block_name.rst.inc
117+
118+
.. include:: /reference/forms/types/options/disabled.rst.inc
119+
120+
.. include:: /reference/forms/types/options/label.rst.inc
121+
122+
.. include:: /reference/forms/types/options/attr.rst.inc
123+
124+
.. include:: /reference/forms/types/options/translation_domain.rst.inc
125+
126+
.. include:: /reference/forms/types/options/auto_initialize.rst.inc
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
auto_initialize
2+
~~~~~~~~~~~~~~~
3+
4+
**type**: ``boolean`` **default**: ``true``
5+
6+
An internal option: sets whether the form should be initialized automatically.
7+
For all fields, this option should only be ``true`` for root forms. You won't
8+
need to change this option and probably won't need to worry about it.

reference/forms/types/options/button_auto_initialize.rst.inc

-9
This file was deleted.

0 commit comments

Comments
 (0)