@@ -27,7 +27,7 @@ |
||
| 27 | 27 | public function buildItem(ItemInterface $item, array $options) |
| 28 | 28 | { |
| 29 | 29 | if ($options['navbar']) { |
| 30 | - $item->setChildrenAttribute('class', 'nav navbar-nav'.($options['navbar-right']?' navbar-right':'')); |
|
| 30 | + $item->setChildrenAttribute('class', 'nav navbar-nav'.($options['navbar-right'] ? ' navbar-right' : '')); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | if ($options['pills']) { |
@@ -329,28 +329,28 @@ |
||
| 329 | 329 | |
| 330 | 330 | protected function getFormType($name) |
| 331 | 331 | { |
| 332 | - if(method_exists('Symfony\Component\Form\AbstractType', 'getBlockPrefix')) { |
|
| 333 | - return $this->formTypeMap[$name]; |
|
| 334 | - } |
|
| 332 | + if(method_exists('Symfony\Component\Form\AbstractType', 'getBlockPrefix')) { |
|
| 333 | + return $this->formTypeMap[$name]; |
|
| 334 | + } |
|
| 335 | 335 | |
| 336 | - return $name; |
|
| 336 | + return $name; |
|
| 337 | 337 | } |
| 338 | 338 | |
| 339 | 339 | protected function getCollectionTypeKey() |
| 340 | 340 | { |
| 341 | - if(method_exists('Symfony\Component\Form\AbstractType', 'getBlockPrefix')) { |
|
| 342 | - return 'entry_type'; |
|
| 343 | - } |
|
| 341 | + if(method_exists('Symfony\Component\Form\AbstractType', 'getBlockPrefix')) { |
|
| 342 | + return 'entry_type'; |
|
| 343 | + } |
|
| 344 | 344 | |
| 345 | - return 'type'; |
|
| 345 | + return 'type'; |
|
| 346 | 346 | } |
| 347 | 347 | |
| 348 | 348 | protected function getCollectionOptionsKey() |
| 349 | 349 | { |
| 350 | - if(method_exists('Symfony\Component\Form\AbstractType', 'getBlockPrefix')) { |
|
| 351 | - return 'entry_options'; |
|
| 352 | - } |
|
| 350 | + if(method_exists('Symfony\Component\Form\AbstractType', 'getBlockPrefix')) { |
|
| 351 | + return 'entry_options'; |
|
| 352 | + } |
|
| 353 | 353 | |
| 354 | - return 'options'; |
|
| 354 | + return 'options'; |
|
| 355 | 355 | } |
| 356 | 356 | } |
@@ -329,7 +329,7 @@ discard block |
||
| 329 | 329 | |
| 330 | 330 | protected function getFormType($name) |
| 331 | 331 | { |
| 332 | - if(method_exists('Symfony\Component\Form\AbstractType', 'getBlockPrefix')) { |
|
| 332 | + if (method_exists('Symfony\Component\Form\AbstractType', 'getBlockPrefix')) { |
|
| 333 | 333 | return $this->formTypeMap[$name]; |
| 334 | 334 | } |
| 335 | 335 | |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | |
| 339 | 339 | protected function getCollectionTypeKey() |
| 340 | 340 | { |
| 341 | - if(method_exists('Symfony\Component\Form\AbstractType', 'getBlockPrefix')) { |
|
| 341 | + if (method_exists('Symfony\Component\Form\AbstractType', 'getBlockPrefix')) { |
|
| 342 | 342 | return 'entry_type'; |
| 343 | 343 | } |
| 344 | 344 | |
@@ -347,7 +347,7 @@ discard block |
||
| 347 | 347 | |
| 348 | 348 | protected function getCollectionOptionsKey() |
| 349 | 349 | { |
| 350 | - if(method_exists('Symfony\Component\Form\AbstractType', 'getBlockPrefix')) { |
|
| 350 | + if (method_exists('Symfony\Component\Form\AbstractType', 'getBlockPrefix')) { |
|
| 351 | 351 | return 'entry_options'; |
| 352 | 352 | } |
| 353 | 353 | |
@@ -80,6 +80,9 @@ discard block |
||
| 80 | 80 | $this->registerTwigRuntimeLoader($environment, $this->renderer); |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | + /** |
|
| 84 | + * @param FormRenderer $renderer |
|
| 85 | + */ |
|
| 83 | 86 | protected function registerTwigRuntimeLoader(\Twig_Environment $environment, $renderer) |
| 84 | 87 | { |
| 85 | 88 | if (!method_exists($environment, 'addRuntimeLoader')) { |
@@ -343,6 +346,11 @@ discard block |
||
| 343 | 346 | return (string) $this->renderer->searchAndRenderBlock($view, 'label', $vars); |
| 344 | 347 | } |
| 345 | 348 | |
| 349 | + /** |
|
| 350 | + * @param string $name |
|
| 351 | + * |
|
| 352 | + * @return string|null |
|
| 353 | + */ |
|
| 346 | 354 | protected function getFormType($name) |
| 347 | 355 | { |
| 348 | 356 | if(method_exists('Symfony\Component\Form\AbstractType', 'getBlockPrefix')) { |
@@ -224,10 +224,10 @@ |
||
| 224 | 224 | ->end() |
| 225 | 225 | ->end() |
| 226 | 226 | ->beforeNormalization() |
| 227 | - ->ifTrue(function ($v) { |
|
| 227 | + ->ifTrue(function($v) { |
|
| 228 | 228 | return isset($v['horizontal']); |
| 229 | 229 | }) |
| 230 | - ->then(function ($v) { |
|
| 230 | + ->then(function($v) { |
|
| 231 | 231 | $v['layout'] = $v['horizontal'] ? 'horizontal' : false; |
| 232 | 232 | unset($v['horizontal']); |
| 233 | 233 | |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | public function configureOptions(OptionsResolver $resolver) |
| 90 | 90 | { |
| 91 | 91 | $resolver->setDefaults(array( |
| 92 | - 'layout' => function (Options $options) { |
|
| 92 | + 'layout' => function(Options $options) { |
|
| 93 | 93 | // BC |
| 94 | 94 | if (isset($options['horizontal']) && false === $options['horizontal']) { |
| 95 | 95 | return false; |