@@ -79,7 +79,4 @@ |
||
79 | 79 | ); |
80 | 80 | $container->setParameter( |
81 | 81 | 'doctrs_sonata_import.encode.list', |
82 | - $config['encode']['list'] |
|
83 | - ); |
|
84 | - } |
|
85 | -} |
|
82 | + $config[ |
|
86 | 83 | \ No newline at end of file |
@@ -79,7 +79,4 @@ |
||
79 | 79 | ); |
80 | 80 | $container->setParameter( |
81 | 81 | 'doctrs_sonata_import.encode.list', |
82 | - $config['encode']['list'] |
|
83 | - ); |
|
84 | - } |
|
85 | -} |
|
82 | + $config[ |
|
86 | 83 | \ No newline at end of file |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | * @param array $config |
32 | 32 | * @param ContainerBuilder $container |
33 | 33 | */ |
34 | -<<<<<<< HEAD |
|
34 | +<< << <<< HEAD |
|
35 | 35 | private function prepairConfig(array $config, ContainerBuilder $container) { |
36 | 36 | ======= |
37 | 37 | private function prepairConfig(array $config, ContainerBuilder $container){ |
@@ -79,7 +79,4 @@ discard block |
||
79 | 79 | ); |
80 | 80 | $container->setParameter( |
81 | 81 | 'doctrs_sonata_import.encode.list', |
82 | - $config['encode']['list'] |
|
83 | - ); |
|
84 | - } |
|
85 | -} |
|
82 | + $config[ |
|
86 | 83 | \ No newline at end of file |
@@ -79,7 +79,4 @@ |
||
79 | 79 | ); |
80 | 80 | $container->setParameter( |
81 | 81 | 'doctrs_sonata_import.encode.list', |
82 | - $config['encode']['list'] |
|
83 | - ); |
|
84 | - } |
|
85 | -} |
|
82 | + $config[ |
|
86 | 83 | \ No newline at end of file |
@@ -79,7 +79,4 @@ |
||
79 | 79 | ); |
80 | 80 | $container->setParameter( |
81 | 81 | 'doctrs_sonata_import.encode.list', |
82 | - $config['encode']['list'] |
|
83 | - ); |
|
84 | - } |
|
85 | -} |
|
82 | + $config[ |
|
86 | 83 | \ No newline at end of file |
@@ -21,11 +21,11 @@ discard block |
||
21 | 21 | private $formBuilder; |
22 | 22 | |
23 | 23 | |
24 | - public function getFormatValue($value){ |
|
25 | - if(!$value){ |
|
24 | + public function getFormatValue($value) { |
|
25 | + if (!$value) { |
|
26 | 26 | return null; |
27 | 27 | } |
28 | - if(!$this->formBuilder->getOption('class')){ |
|
28 | + if (!$this->formBuilder->getOption('class')) { |
|
29 | 29 | return $value; |
30 | 30 | } |
31 | 31 | |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | * Если значение число, то пытаемся найти его по ID. |
56 | 56 | * Если значение не число, то ищем его по полю name |
57 | 57 | */ |
58 | - if(is_numeric($value)){ |
|
58 | + if (is_numeric($value)) { |
|
59 | 59 | $value = $repo->find($value); |
60 | 60 | } else { |
61 | 61 | try { |
@@ -3,9 +3,9 @@ |
||
3 | 3 | |
4 | 4 | namespace Doctrs\SonataImportBundle\Service\SonataImportType; |
5 | 5 | |
6 | -class BooleanType implements ImportInterface{ |
|
6 | +class BooleanType implements ImportInterface { |
|
7 | 7 | |
8 | - public function getFormatValue($value){ |
|
8 | + public function getFormatValue($value) { |
|
9 | 9 | return filter_var($value, FILTER_VALIDATE_BOOLEAN); |
10 | 10 | } |
11 | 11 |
@@ -4,6 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Sonata\AdminBundle\Admin\AbstractAdmin; |
6 | 6 | |
7 | -interface AdminAbstractAwareInterface{ |
|
7 | +interface AdminAbstractAwareInterface { |
|
8 | 8 | public function setAdminAbstract(AbstractAdmin $abstractAdmin); |
9 | 9 | } |
@@ -4,6 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Symfony\Component\Form\FormBuilderInterface; |
6 | 6 | |
7 | -interface FormBuilderAwareInterface{ |
|
7 | +interface FormBuilderAwareInterface { |
|
8 | 8 | public function setFormBuilder(FormBuilderInterface $formBuilder); |
9 | 9 | } |
@@ -3,9 +3,9 @@ |
||
3 | 3 | |
4 | 4 | namespace Doctrs\SonataImportBundle\Service\SonataImportType; |
5 | 5 | |
6 | -class IntegerType implements ImportInterface{ |
|
6 | +class IntegerType implements ImportInterface { |
|
7 | 7 | |
8 | - public function getFormatValue($value){ |
|
8 | + public function getFormatValue($value) { |
|
9 | 9 | return (int)$value; |
10 | 10 | } |
11 | 11 |
@@ -3,9 +3,9 @@ |
||
3 | 3 | |
4 | 4 | namespace Doctrs\SonataImportBundle\Service\SonataImportType; |
5 | 5 | |
6 | -class DateType implements ImportInterface{ |
|
6 | +class DateType implements ImportInterface { |
|
7 | 7 | |
8 | - public function getFormatValue($value){ |
|
8 | + public function getFormatValue($value) { |
|
9 | 9 | return $value ? new \DateTime($value) : null; |
10 | 10 | } |
11 | 11 |
@@ -191,10 +191,10 @@ |
||
191 | 191 | |
192 | 192 | $class = $this->getContainer()->get($item['class']); |
193 | 193 | |
194 | - if($class instanceof AdminAbstractAwareInterface){ |
|
194 | + if ($class instanceof AdminAbstractAwareInterface) { |
|
195 | 195 | $class->setAdminAbstract($admin); |
196 | 196 | } |
197 | - if($class instanceof FormBuilderAwareInterface){ |
|
197 | + if ($class instanceof FormBuilderAwareInterface) { |
|
198 | 198 | $class->setFormBuilder($formBuilder); |
199 | 199 | } |
200 | 200 |