@@ -2,10 +2,7 @@ discard block |
||
2 | 2 | |
3 | 3 | namespace Oro\Bundle\EntityExtendBundle\Form\Guesser; |
4 | 4 | |
5 | -use Symfony\Component\Form\Guess; |
|
6 | - |
|
7 | 5 | use Doctrine\Common\Persistence\ManagerRegistry; |
8 | - |
|
9 | 6 | use Oro\Bundle\EntityBundle\Form\Guesser\AbstractFormGuesser; |
10 | 7 | use Oro\Bundle\EntityConfigBundle\Config\ConfigInterface; |
11 | 8 | use Oro\Bundle\EntityConfigBundle\Config\Id\FieldConfigId; |
@@ -15,7 +12,6 @@ discard block |
||
15 | 12 | use Oro\Bundle\EntityExtendBundle\Tools\ExtendConfigDumper; |
16 | 13 | use Oro\Bundle\EntityExtendBundle\Tools\ExtendHelper; |
17 | 14 | use Oro\Bundle\EntityExtendBundle\Validator\Constraints\Decimal; |
18 | - |
|
19 | 15 | use Symfony\Component\Validator\Constraints\Length; |
20 | 16 | |
21 | 17 | class ExtendFieldTypeGuesser extends AbstractFormGuesser |
@@ -7,7 +7,6 @@ |
||
7 | 7 | use Symfony\Component\Form\FormView; |
8 | 8 | use Symfony\Component\OptionsResolver\Options; |
9 | 9 | use Symfony\Component\OptionsResolver\OptionsResolverInterface; |
10 | - |
|
11 | 10 | use Oro\Bundle\EntityConfigBundle\Config\Id\ConfigIdInterface; |
12 | 11 | use Oro\Bundle\EntityExtendBundle\Form\Util\EnumTypeHelper; |
13 | 12 | use Oro\Bundle\EntityExtendBundle\Tools\ExtendHelper; |
@@ -7,7 +7,6 @@ |
||
7 | 7 | use Symfony\Component\OptionsResolver\OptionsResolverInterface; |
8 | 8 | use Symfony\Component\Translation\TranslatorInterface; |
9 | 9 | use Symfony\Component\Validator\Constraints as Assert; |
10 | - |
|
11 | 10 | use Oro\Bundle\EntityConfigBundle\Config\ConfigManager; |
12 | 11 | use Oro\Bundle\EntityConfigBundle\Config\Id\FieldConfigId; |
13 | 12 | use Oro\Bundle\EntityConfigBundle\Provider\ConfigProvider; |
@@ -10,7 +10,6 @@ |
||
10 | 10 | use Symfony\Component\Form\FormInterface; |
11 | 11 | use Symfony\Component\OptionsResolver\OptionsResolverInterface; |
12 | 12 | use Symfony\Component\Validator\Constraints as Assert; |
13 | - |
|
14 | 13 | use Oro\Bundle\EntityConfigBundle\Config\Config; |
15 | 14 | use Oro\Bundle\EntityConfigBundle\Config\ConfigManager; |
16 | 15 | use Oro\Bundle\EntityExtendBundle\EntityConfig\ExtendScope; |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Symfony\Component\Form\AbstractType; |
6 | 6 | use Symfony\Component\OptionsResolver\OptionsResolverInterface; |
7 | - |
|
8 | 7 | use Oro\Bundle\EntityConfigBundle\Config\ConfigManager; |
9 | 8 | use Oro\Bundle\EntityConfigBundle\Config\Id\FieldConfigId; |
10 | 9 |
@@ -69,6 +69,10 @@ discard block |
||
69 | 69 | ); |
70 | 70 | } |
71 | 71 | |
72 | + /** |
|
73 | + * @param string $entityClassName |
|
74 | + * @param string|null $relationType |
|
75 | + */ |
|
72 | 76 | protected function getEntityChoiceList($entityClassName, $relationType) |
73 | 77 | { |
74 | 78 | $choices = []; |
@@ -82,6 +86,10 @@ discard block |
||
82 | 86 | if (in_array($relationType, [RelationTypeBase::ONE_TO_MANY, RelationTypeBase::MANY_TO_MANY], true)) { |
83 | 87 | $entityIds = array_filter( |
84 | 88 | $entityIds, |
89 | + |
|
90 | + /** |
|
91 | + * @param string $configId |
|
92 | + */ |
|
85 | 93 | function (EntityConfigId $configId) { |
86 | 94 | $config = $this->configManager->getConfig($configId); |
87 | 95 | |
@@ -92,6 +100,10 @@ discard block |
||
92 | 100 | |
93 | 101 | $entityIds = array_filter( |
94 | 102 | $entityIds, |
103 | + |
|
104 | + /** |
|
105 | + * @param string $configId |
|
106 | + */ |
|
95 | 107 | function (EntityConfigId $configId) { |
96 | 108 | $config = $this->configManager->getConfig($configId); |
97 | 109 |
@@ -7,7 +7,6 @@ |
||
7 | 7 | use Symfony\Component\Form\FormEvent; |
8 | 8 | use Symfony\Component\Form\FormEvents; |
9 | 9 | use Symfony\Component\OptionsResolver\OptionsResolverInterface; |
10 | - |
|
11 | 10 | use Oro\Bundle\EntityConfigBundle\Config\ConfigManager; |
12 | 11 | use Oro\Bundle\EntityConfigBundle\Config\Id\EntityConfigId; |
13 | 12 | use Oro\Bundle\EntityConfigBundle\Config\Id\FieldConfigId; |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Doctrine\ORM\Query\Expr\From; |
6 | 6 | use Doctrine\ORM\QueryBuilder; |
7 | - |
|
8 | 7 | use Oro\Bundle\DataGridBundle\Datagrid\Builder; |
9 | 8 | use Oro\Bundle\DataGridBundle\Datagrid\DatagridGuesser; |
10 | 9 | use Oro\Bundle\DataGridBundle\Datagrid\Common\DatagridConfiguration; |
@@ -6,7 +6,6 @@ |
||
6 | 6 | use Doctrine\DBAL\Schema\Schema; |
7 | 7 | use Doctrine\DBAL\Schema\Table; |
8 | 8 | use Doctrine\DBAL\Types\Type; |
9 | - |
|
10 | 9 | use Oro\Bundle\EntityExtendBundle\Migration\Schema\ExtendSchema; |
11 | 10 | use Oro\Bundle\EntityExtendBundle\Tools\ExtendDbIdentifierNameGenerator; |
12 | 11 | use Oro\Bundle\EntityExtendBundle\Extend\FieldTypeHelper; |
@@ -226,6 +226,9 @@ discard block |
||
226 | 226 | } |
227 | 227 | } |
228 | 228 | |
229 | + /** |
|
230 | + * @param string $associationName |
|
231 | + */ |
|
229 | 232 | protected function renameManyToOneExtendField( |
230 | 233 | Schema $schema, |
231 | 234 | QueryBag $queries, |
@@ -247,6 +250,9 @@ discard block |
||
247 | 250 | } |
248 | 251 | } |
249 | 252 | |
253 | + /** |
|
254 | + * @param string $associationName |
|
255 | + */ |
|
250 | 256 | protected function renameOneToManyExtendField( |
251 | 257 | Schema $schema, |
252 | 258 | QueryBag $queries, |
@@ -4,19 +4,15 @@ |
||
4 | 4 | |
5 | 5 | use Doctrine\DBAL\Schema\Schema; |
6 | 6 | use Doctrine\DBAL\Schema\Table; |
7 | - |
|
8 | 7 | use Symfony\Component\DependencyInjection\ContainerInterface; |
9 | 8 | use Symfony\Component\DependencyInjection\ContainerAwareInterface; |
10 | - |
|
11 | 9 | use Oro\Bundle\EntityConfigBundle\Config\ConfigManager; |
12 | 10 | use Oro\Bundle\EntityConfigBundle\Config\Id\EntityConfigId; |
13 | 11 | use Oro\Bundle\EntityConfigBundle\Config\Id\FieldConfigId; |
14 | - |
|
15 | 12 | use Oro\Bundle\EntityExtendBundle\Migration\EntityMetadataHelper; |
16 | 13 | use Oro\Bundle\EntityExtendBundle\Extend\RelationType; |
17 | 14 | use Oro\Bundle\EntityExtendBundle\Tools\ExtendHelper; |
18 | 15 | use Oro\Bundle\EntityExtendBundle\Tools\ExtendDbIdentifierNameGenerator; |
19 | - |
|
20 | 16 | use Oro\Bundle\MigrationBundle\Migration\Extension\NameGeneratorAwareInterface; |
21 | 17 | use Oro\Bundle\MigrationBundle\Migration\Migration; |
22 | 18 | use Oro\Bundle\MigrationBundle\Migration\QueryBag; |