@@ 168-179 (lines=12) @@ | ||
165 | * @param ContainerBuilder $container Service container. |
|
166 | * @return Extension $this Fluent interface. |
|
167 | */ |
|
168 | protected function configureSourceType(array $config, ContainerBuilder $container) |
|
169 | { |
|
170 | $defaults = array_merge($config['form_types']['source_type'], array('choices' => array())); |
|
171 | ||
172 | foreach ($config['rates'] as $rate) { |
|
173 | $defaults['choices'][sprintf('exchange_rate.source.%s', $rate['source'])] = $rate['source']; |
|
174 | } |
|
175 | ||
176 | $container->setParameter('run_open_code.exchange_rate.form_type.source_type', $defaults); |
|
177 | ||
178 | return $this; |
|
179 | } |
|
180 | ||
181 | /** |
|
182 | * Configure "RunOpenCode\\Bundle\\ExchangeRate\\Form\\Type\\RateTypeType" default settings. |
|
@@ 188-199 (lines=12) @@ | ||
185 | * @param ContainerBuilder $container Service container. |
|
186 | * @return Extension $this Fluent interface. |
|
187 | */ |
|
188 | protected function configureRateTypeType(array $config, ContainerBuilder $container) |
|
189 | { |
|
190 | $defaults = array_merge($config['form_types']['rate_type_type'], array('choices' => array())); |
|
191 | ||
192 | foreach ($config['rates'] as $rate) { |
|
193 | $defaults['choices'][sprintf('exchange_rate.rate_type.%s.%s', $rate['source'], $rate['rate_type'])] = $rate['rate_type']; |
|
194 | } |
|
195 | ||
196 | $container->setParameter('run_open_code.exchange_rate.form_type.rate_type_type', $defaults); |
|
197 | ||
198 | return $this; |
|
199 | } |
|
200 | ||
201 | /** |
|
202 | * Configure "RunOpenCode\\Bundle\\ExchangeRate\\Form\\Type\\CurrencyCodeType" default settings. |