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