|
1 | 1 | .. index::
|
2 | 2 | single: Configuration Reference; Framework
|
3 | 3 |
|
4 |
| -FrameworkBundle Configuration |
5 |
| -============================= |
| 4 | +FrameworkBundle Configuration ("framework") |
| 5 | +=========================================== |
| 6 | + |
| 7 | +This reference document is a work in progress. It should be accurate, but |
| 8 | +all options are not yet fully covered. |
6 | 9 |
|
7 | 10 | The ``FrameworkBundle`` contains most of the "base" framework functionality
|
8 | 11 | and can be configured under the ``framework`` key in your application configuration.
|
9 | 12 | This includes settings related to sessions, translation, forms, validation,
|
10 | 13 | routing and more.
|
11 | 14 |
|
| 15 | +Configuration |
| 16 | +------------- |
| 17 | + |
| 18 | +* `charset`_ |
| 19 | +* `secret`_ |
| 20 | +* `exception_controller`_ |
| 21 | +* `ide`_ |
| 22 | +* `test`_ |
| 23 | +* `form`_ |
| 24 | + * :ref:`enabled<config-framework-form-enabled>` |
| 25 | +* `csrf_protection`_ |
| 26 | + * :ref:`enabled<config-framework-csrf-enabled>` |
| 27 | + * `field_name` |
| 28 | + |
| 29 | +charset |
| 30 | +....... |
| 31 | + |
| 32 | +**type**: ``string`` **default**: ``UTF-8`` |
| 33 | + |
| 34 | +The character set that's used throughout the framework. It becomes the service |
| 35 | +container parameter named ``kernel.charset``. |
| 36 | + |
| 37 | +secret |
| 38 | +...... |
| 39 | + |
| 40 | +**type**: ``string`` **required** |
| 41 | + |
| 42 | +This is a string that should be unique to your application. In practice, |
| 43 | +it's used for generating the CSRF tokens, but it could be used in any other |
| 44 | +context where having a unique string is useful. It becomes the service container |
| 45 | +parameter named ``kernel.secret``. |
| 46 | + |
| 47 | +exception_controller |
| 48 | +.................... |
| 49 | + |
| 50 | +**type**: ``string`` **default**: ``Symfony\\Bundle\\FrameworkBundle\\Controller\\ExceptionController::showAction`` |
| 51 | + |
| 52 | +This is the controller that is activated after an exception is thrown anywhere |
| 53 | +in your application. The default controller |
| 54 | +(:class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\ExceptionController`) |
| 55 | +is what's responsible for rendering specific templates under different error |
| 56 | +conditions (see :doc:`/cookbook/controller/error_pages`). Modifying this |
| 57 | +option is advanced. If you need to customize an error page you should use |
| 58 | +the previous link. If you need to perform some behavior on an exception, |
| 59 | +you should add a listener to the ``kernel.exception`` event (see :ref:`dic-tags-kernel-event-listener`). |
| 60 | + |
| 61 | +ide |
| 62 | +... |
| 63 | + |
| 64 | +**type**: ``string`` **default**: ``null`` |
| 65 | + |
| 66 | +If you're using an IDE like TextMate or Mac Vim, then Symfony can turn all |
| 67 | +of the file paths in an exception message into a link, which will open that |
| 68 | +file in your IDE. |
| 69 | + |
| 70 | +Currently, the following options are supported: |
| 71 | + |
| 72 | +* ``textmate`` |
| 73 | +* ``macvim`` |
| 74 | + |
| 75 | +test |
| 76 | +.... |
| 77 | + |
| 78 | +**type**: ``Boolean`` |
| 79 | + |
| 80 | +If this configuration parameter is present, then the services related to |
| 81 | +testing your application are loaded. This setting should be present in your |
| 82 | +``test`` environment (usually via ``app/config/config_test.yml``). For more |
| 83 | +information, see :doc:`/book/testing`. |
| 84 | + |
| 85 | +form |
| 86 | +.... |
| 87 | + |
| 88 | +csrf_protection |
| 89 | +............... |
| 90 | + |
| 91 | + |
12 | 92 | Full Default Configuration
|
13 | 93 | --------------------------
|
14 | 94 |
|
@@ -110,15 +190,5 @@ Full Default Configuration
|
110 | 190 | file_cache_dir: %kernel.cache_dir%/annotations
|
111 | 191 | debug: true
|
112 | 192 |
|
113 |
| -General Configuration |
114 |
| ---------------------- |
115 |
| - |
116 |
| -* ``charset`` (type: string) |
117 |
| - |
118 |
| -* ``secret`` (type: string, *required*) |
119 |
| - |
120 |
| -* ``exception_controller`` (type: string) |
121 | 193 |
|
122 |
| -* ``ide`` (type: string) |
123 | 194 |
|
124 |
| -* ``test`` (type: Boolean) |
|
0 commit comments