@@ -33,16 +33,19 @@ To use the path provider you must register it in the container and add the
33
33
34
34
.. code-block :: yaml
35
35
36
- my_cms.some_bundle.path_provider.foobar :
37
- class : " FoobarProvider"
38
- scope : prototype
39
- tags :
40
- - { name: cmf_routing_auto.provider, alias: "foobar"}
36
+ # app/config/config.yml
37
+ services :
38
+ my_cms_bundle.path_provider.foobar :
39
+ class : " FoobarProvider"
40
+ scope : prototype
41
+ tags :
42
+ - { name: cmf_routing_auto.provider, alias: "foobar"}
41
43
42
44
.. code-block :: xml
43
45
46
+ <!-- app/config/config.xml -->
44
47
<service
45
- id =" my_cms.some_bundle .path_provider.foobar"
48
+ id =" my_cms_bundle .path_provider.foobar"
46
49
class =" FoobarProvider"
47
50
scope =" prototype"
48
51
>
@@ -51,13 +54,14 @@ To use the path provider you must register it in the container and add the
51
54
52
55
.. code-block :: php
53
56
57
+ // app/config/config.php
54
58
use Symfony\Component\DependencyInjection\Definition;
55
59
56
60
$definition = new Definition('FooBarProvider');
57
61
$definition->addTag('cmf_routing_auto.provider', array('alias' => 'foobar'));
58
62
$definition->setScope('prototype');
59
63
60
- $container->setDefinition('my_cms.some_bundle .path_provider.foobar', $definition);
64
+ $container->setDefinition('my_cms_bundle .path_provider.foobar', $definition);
61
65
62
66
The ``FoobarProvider `` is now available as **foobar ** in the routing auto
63
67
configuration.
@@ -107,14 +111,17 @@ It is registered in the DI configuration as follows:
107
111
108
112
.. code-block :: yaml
109
113
110
- cmf_routing_auto.not_exists_action.throw_exception
111
- class : " My\C ms\A utoRoute\P athNotExists\T hrowException"
112
- scope : prototype
113
- tags :
114
- - { name: cmf_routing_auto.provider, alias: "throw_exception"}
114
+ # app/config/config.xml
115
+ services :
116
+ cmf_routing_auto.not_exists_action.throw_exception
117
+ class : " My\C ms\A utoRoute\P athNotExists\T hrowException"
118
+ scope : prototype
119
+ tags :
120
+ - { name: cmf_routing_auto.provider, alias: "throw_exception"}
115
121
116
122
.. code-block :: xml
117
123
124
+ <!-- app/config/config.xml -->
118
125
<service
119
126
id =" my_cms.not_exists_action.throw_exception"
120
127
class =" My\Cms\AutoRoute\PathNotExists\ThrowException"
@@ -125,6 +132,7 @@ It is registered in the DI configuration as follows:
125
132
126
133
.. code-block :: php
127
134
135
+ // app/config/config.php
128
136
use Symfony\Component\DependencyInjection\Definition;
129
137
130
138
$definition = new Definition('My\Cms\AutoRoute\PathNotExists\ThrowException');
0 commit comments