@@ -27,7 +27,7 @@ Configuration
27
27
* `test `_
28
28
* `default_locale `_
29
29
* `trusted_hosts `_
30
- * `form `_
30
+ * :ref: `form < reference-framework-form > `_
31
31
* :ref:`enabled <form.enabled>`
32
32
* `csrf_protection `_
33
33
* :ref: `enabled <form.csrf_protection.enabled >`
@@ -50,15 +50,15 @@ Configuration
50
50
* `ip `_
51
51
* :ref: `path <profiler.matcher.path >`
52
52
* `service `_
53
- * router
54
- * resource
55
- * type
56
- * http_port
57
- * https_port
58
- * strict_requirements
53
+ * ` router `_
54
+ * ` resource `_
55
+ * ` type `_
56
+ * ` http_port `_
57
+ * ` https_port `_
58
+ * ` strict_requirements `_
59
59
* `session `_
60
- * storage_id
61
- * handler_id
60
+ * ` storage_id `_
61
+ * ` handler_id `_
62
62
* `name `_
63
63
* `cookie_lifetime `_
64
64
* `cookie_path `_
@@ -72,22 +72,22 @@ Configuration
72
72
* `templating `_
73
73
* `assets_version `_
74
74
* `assets_version_format `_
75
- * hinclude_default_template
76
- * form
77
- * resources
75
+ * ` hinclude_default_template `_
76
+ * :ref: ` form < templating.form >`_
77
+ * ` resources`_
78
78
* `assets_base_urls`_
79
79
* http
80
80
* ssl
81
- * cache
82
- * engines
83
- * loaders
81
+ * :ref:` cache <templating.cache>`
82
+ * ` engines `_
83
+ * ` loaders `_
84
84
* packages
85
85
* `translator `_
86
86
* :ref: `enabled <translator.enabled >`
87
87
* `fallback `_
88
88
* `validation `_
89
89
* enabled
90
- * `cache `_
90
+ * :ref: `cache < validation.cache >`
91
91
* `enable_annotations `_
92
92
* `translation_domain `_
93
93
* annotations
@@ -601,9 +601,85 @@ service
601
601
602
602
This setting contains the service id of a custom matcher.
603
603
604
+ router
605
+ ~~~~~~
606
+
607
+ resource
608
+ ........
609
+
610
+ **type **: ``string `` **required **
611
+
612
+ Specifies the path to the routes used by the default router.
613
+
614
+ It becomes the service container parameter called ``router.resource ``.
615
+
616
+ type
617
+ ....
618
+
619
+ **type **: ``string ``
620
+
621
+ The type of the resource to hint the loaders about the format. This isn't
622
+ needed when you use the default routers with the expected file extensions
623
+ (``.xml ``, ``.yml `` / ``.yaml ``, ``.php ``).
624
+
625
+ http_port
626
+ .........
627
+
628
+ **type **: ``integer `` **default **: ``80 ``
629
+
630
+ The port for normal http requests (this is used when matching the scheme).
631
+
632
+ It becomes the service container parameter called ``router.resource ``.
633
+
634
+ https_port
635
+ ..........
636
+
637
+ **type **: ``integer `` **default **: ``443 ``
638
+
639
+ The port for https requests (this is used when matching the scheme).
640
+
641
+ strict_requirements
642
+ ...................
643
+
644
+ **type **: ``mixed `` **default **: ``true ``
645
+
646
+ Determines the behaviour when a route matches, but the parameters do not match
647
+ the specified requirements for that route. Can be one of:
648
+
649
+ ``true ``
650
+ Throw an exception when the requirements are not met;
651
+ ``false ``
652
+ Disable exceptions when the requirements are not met and return ``null ``
653
+ instead;
654
+ ``null ``
655
+ Disable checking the requirements (thus, match the route even when the
656
+ requirements don't match).
657
+
658
+ ``false `` is recommended in the development environment, while ``false `` or
659
+ ``null `` might be preferred in production.
660
+
604
661
session
605
662
~~~~~~~
606
663
664
+ storage_id
665
+ ..........
666
+
667
+ **type **: ``string `` **default **: ``'session.storage.native' ``
668
+
669
+ The service id used for session storage. The ``session.storage `` service alias
670
+ will be set to this service id.
671
+
672
+ handler_id
673
+ ..........
674
+
675
+ **type **: ``string `` **default **: ``'session.handler.native_file' ``
676
+
677
+ The service id used for session storage. The ``session.handler `` service alias
678
+ will be set to this service id.
679
+
680
+ You can also set it to ``null ``, to default to the handler of your PHP
681
+ installation.
682
+
607
683
name
608
684
....
609
685
@@ -655,6 +731,13 @@ This means that the cookie won't be accessible by scripting languages, such
655
731
as JavaScript. This setting can effectively help to reduce identity theft
656
732
through XSS attacks.
657
733
734
+ gc_divisor
735
+ ..........
736
+
737
+ **type **: ``integer `` **default **: ``100 ``
738
+
739
+ See `gc_probability `_.
740
+
658
741
gc_probability
659
742
..............
660
743
@@ -665,13 +748,6 @@ on every session initialization. The probability is calculated by using
665
748
``gc_probability `` / ``gc_divisor ``, e.g. 1/100 means there is a 1% chance
666
749
that the GC process will start on each request.
667
750
668
- gc_divisor
669
- ..........
670
-
671
- **type **: ``integer `` **default **: ``100 ``
672
-
673
- See `gc_probability `_.
674
-
675
751
gc_maxlifetime
676
752
..............
677
753
@@ -700,7 +776,7 @@ the value to ``null``:
700
776
# app/config/config.yml
701
777
framework :
702
778
session :
703
- save_path : null
779
+ save_path : ~
704
780
705
781
.. code-block :: xml
706
782
@@ -745,31 +821,14 @@ For more details, see :doc:`/cookbook/serializer`.
745
821
templating
746
822
~~~~~~~~~~
747
823
748
- assets_base_urls
749
- ................
750
-
751
- **default **: ``{ http: [], ssl: [] } ``
752
-
753
- This option allows you to define base URLs to be used for assets referenced
754
- from ``http `` and ``ssl `` (``https ``) pages. A string value may be provided in
755
- lieu of a single-element array. If multiple base URLs are provided, Symfony
756
- will select one from the collection each time it generates an asset's path.
757
-
758
- For your convenience, ``assets_base_urls `` can be set directly with a string or
759
- array of strings, which will be automatically organized into collections of base
760
- URLs for ``http `` and ``https `` requests. If a URL starts with ``https:// `` or
761
- is `protocol-relative `_ (i.e. starts with `// `) it will be added to both
762
- collections. URLs starting with ``http:// `` will only be added to the
763
- ``http `` collection.
764
-
765
824
.. _ref-framework-assets-version :
766
825
767
826
assets_version
768
827
..............
769
828
770
829
**type **: ``string ``
771
830
772
- This option is used to * bust * the cache on assets by globally adding a query
831
+ This option is used to bust the cache on assets by globally adding a query
773
832
parameter to all rendered asset paths (e.g. ``/images/logo.png?v2 ``). This
774
833
applies only to assets rendered via the Twig ``asset `` function (or PHP equivalent)
775
834
as well as assets rendered with Assetic.
@@ -829,19 +888,22 @@ Now, the same asset will be rendered as ``/images/logo.png?v2`` If you use
829
888
this feature, you **must ** manually increment the ``assets_version `` value
830
889
before each deployment so that the query parameters change.
831
890
832
- You can also control how the query string works via the `assets_version_format `_
833
- option.
891
+ .. tip ::
892
+
893
+ As with all settings, you can use a parameter as value for the
894
+ ``assets_version ``. This makes it easier to increment the cache on each
895
+ deployment.
834
896
835
897
assets_version_format
836
898
.....................
837
899
838
900
**type **: ``string `` **default **: ``%%s?%%s ``
839
901
840
- This specifies a :phpfunction: `sprintf ` pattern that will be used with the ` assets_version `_
841
- option to construct an asset's path. By default, the pattern adds the asset's
842
- version as a query string. For example, if `` assets_version_format `` is set to
843
- ``%%s?version=%%s `` and ``assets_version `` is set to `` 5 ``, the asset's path
844
- would be ``/images/logo.png?version=5 ``.
902
+ This specifies a :phpfunction: `sprintf ` pattern that will be used with the
903
+ ` assets_version `_ option to construct an asset's path. By default, the pattern
904
+ adds the asset's version as a query string. For example, if
905
+ ``assets_version_format `` is set to `` %%s?version=%%s `` and ``assets_version ``
906
+ is set to `` 5 ``, the asset's path would be ``/images/logo.png?version=5 ``.
845
907
846
908
.. note ::
847
909
@@ -867,6 +929,119 @@ would be ``/images/logo.png?version=5``.
867
929
The latter option is useful if you would like older asset versions to remain
868
930
accessible at their original URL.
869
931
932
+ hinclude_default_template
933
+ .........................
934
+
935
+ **type **: ``string `` **default **: ``null ``
936
+
937
+ Sets the content shown during the loading of the fragment or when JavaScript is
938
+ disabled. This can be either a template name or the content itself. It becomes
939
+ the service container parameter named ``fragment.renderer.hinclude.global_template ``.
940
+
941
+ .. seealso ::
942
+
943
+ See :ref: `book-templating-hinclude ` for more information about hinclude.
944
+
945
+ .. _templating.form :
946
+
947
+ form
948
+ ....
949
+
950
+ resources
951
+ """""""""
952
+
953
+ **type **: ``string[] `` **default **: ``[FrameworkBundle:Form] ``
954
+
955
+ A list of all resources for form theming in PHP. If you have custom global form
956
+ themes in ``src/WebsiteBundle/Resources/views/Form ``, you can configure this like:
957
+
958
+ .. configuration-block ::
959
+
960
+ .. code-block :: yaml
961
+
962
+ framework :
963
+ templating :
964
+ form :
965
+ resources :
966
+ - ' WebsiteBundle:Form'
967
+
968
+ .. code-block :: xml
969
+
970
+ <framework : config >
971
+ <framework : templating >
972
+ <framework : form >
973
+ <framework : resource >WebsiteBundle:Form</framework : resource >
974
+ </framework : form >
975
+ </framework : templating >
976
+ </framework : config >
977
+
978
+ .. code-block :: php
979
+
980
+ $container->loadFromExtension('framework', array(
981
+ 'templating' => array(
982
+ 'form' => array(
983
+ 'resources' => array(
984
+ 'WebsiteBundle:Form'
985
+ ),
986
+ ),
987
+ ),
988
+ ));
989
+
990
+ .. note ::
991
+
992
+ The default form templates from ``FrameworkBundle:Form `` will always be
993
+ included in the form resources.
994
+
995
+ assets_base_urls
996
+ ................
997
+
998
+ **type **: ``{ http: [], ssl: [] } ``
999
+
1000
+ This option allows you to define base URLs to be used for assets referenced
1001
+ from ``http `` and ``ssl `` (``https ``) pages. A string value may be provided in
1002
+ lieu of a single-element array. If multiple base URLs are provided, Symfony2
1003
+ will select one from the collection each time it generates an asset's path.
1004
+
1005
+ For your convenience, ``assets_base_urls `` can be set directly with a string or
1006
+ array of strings, which will be automatically organized into collections of base
1007
+ URLs for ``http `` and ``https `` requests. If a URL starts with ``https:// `` or
1008
+ is `protocol-relative `_ (i.e. starts with ``// ``), it will be added to both
1009
+ collections. URLs starting with ``http:// `` will only be added to the
1010
+ ``http `` collection.
1011
+
1012
+ .. _templating.cache :
1013
+
1014
+ cache
1015
+ .....
1016
+
1017
+ **type **: ``string ``
1018
+
1019
+ The path to the cache directory for templates. When this is not set, caching is
1020
+ disabled. It becomes the service container parameter named
1021
+ ``templating.loader.cache.path ``.
1022
+
1023
+ engines
1024
+ .......
1025
+
1026
+ **type **: ``string[] `` / ``string `` **required **
1027
+
1028
+ The Templating Engine to use. This can either be a string (when only one engine
1029
+ is configured) or an array of engines. It becomes the service container
1030
+ parameter named ``templating.engines ``.
1031
+
1032
+ At least one engine is required.
1033
+
1034
+ loaders
1035
+ .......
1036
+
1037
+ **type **: ``string[] ``
1038
+
1039
+ An array (or a string when configuring just one loader) of service ids for
1040
+ templating loaders.
1041
+
1042
+ packages
1043
+ ........
1044
+
870
1045
translator
871
1046
~~~~~~~~~~
872
1047
@@ -891,6 +1066,8 @@ For more details, see :doc:`/book/translation`.
891
1066
validation
892
1067
~~~~~~~~~~
893
1068
1069
+ .. _validation.cache :
1070
+
894
1071
cache
895
1072
.....
896
1073
@@ -916,6 +1093,7 @@ translation_domain
916
1093
917
1094
The translation domain that is used when translating validation constraint
918
1095
error messages.
1096
+
919
1097
.. _`protocol-relative` : http://tools.ietf.org/html/rfc3986#section-4.2
920
1098
.. _`PhpStormOpener` : https://github.com/pinepain/PhpStormOpener
921
1099
.. _`egulias/email-validator` : https://github.com/egulias/EmailValidator
0 commit comments