@@ 25-39 (lines=15) @@ | ||
22 | /** |
|
23 | * @param ContainerBuilder $container |
|
24 | */ |
|
25 | public function loadFormlyFields(ContainerBuilder $container) |
|
26 | { |
|
27 | if (!$container->hasDefinition('container.formly_field')) { |
|
28 | return; |
|
29 | } |
|
30 | ||
31 | $containerDefinition = $container->getDefinition('container.formly_field'); |
|
32 | $taggedServices = $container->findTaggedServiceIds('formly_field'); |
|
33 | ||
34 | foreach ($taggedServices as $id => $tags) { |
|
35 | foreach ($tags as $attributes) { |
|
36 | $containerDefinition->addMethodCall('addFormlyField', [$attributes['alias'], new Reference($id)]); |
|
37 | } |
|
38 | } |
|
39 | } |
|
40 | ||
41 | /** |
|
42 | * @param ContainerBuilder $container |
|
@@ 44-54 (lines=11) @@ | ||
41 | /** |
|
42 | * @param ContainerBuilder $container |
|
43 | */ |
|
44 | public function loadDataProviders(ContainerBuilder $container) |
|
45 | { |
|
46 | $containerDefinition = $container->getDefinition('dynamic_form.factory'); |
|
47 | $taggedServices = $container->findTaggedServiceIds('dynamic_form.data_provider'); |
|
48 | ||
49 | foreach ($taggedServices as $id => $tags) { |
|
50 | foreach ($tags as $attributes) { |
|
51 | $containerDefinition->addMethodCall('addDataProvider', [$attributes['alias'], new Reference($id)]); |
|
52 | } |
|
53 | } |
|
54 | } |
|
55 | ||
56 | /** |
|
57 | * @param ContainerBuilder $container |
|
@@ 59-69 (lines=11) @@ | ||
56 | /** |
|
57 | * @param ContainerBuilder $container |
|
58 | */ |
|
59 | public function loadSubscribers(ContainerBuilder $container) |
|
60 | { |
|
61 | $containerDefinition = $container->getDefinition('dynamic_form.factory'); |
|
62 | $taggedServices = $container->findTaggedServiceIds('dynamic_form.event_subscriber'); |
|
63 | ||
64 | foreach ($taggedServices as $id => $tags) { |
|
65 | foreach ($tags as $attributes) { |
|
66 | $containerDefinition->addMethodCall('addEventSubscriber', [$attributes['form_name'], new Reference($id)]); |
|
67 | } |
|
68 | } |
|
69 | } |
|
70 | ||
71 | /** |
|
72 | * @param ContainerBuilder $container |
|
@@ 74-84 (lines=11) @@ | ||
71 | /** |
|
72 | * @param ContainerBuilder $container |
|
73 | */ |
|
74 | public function loadHelpMessageProviders(ContainerBuilder $container) |
|
75 | { |
|
76 | $containerDefinition = $container->getDefinition('dynamic_form.factory'); |
|
77 | $taggedServices = $container->findTaggedServiceIds('dynamic_form.help_message_provider'); |
|
78 | ||
79 | foreach ($taggedServices as $id => $tags) { |
|
80 | foreach ($tags as $attributes) { |
|
81 | $containerDefinition->addMethodCall('addHelpMessageProvider', [$attributes['alias'], new Reference($id)]); |
|
82 | } |
|
83 | } |
|
84 | } |
|
85 | } |
|
86 |