| Conditions | 2 |
| Paths | 2 |
| Total Lines | 21 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 37 | public function create($schemaAlias, $data = null, array $options = []) |
||
| 38 | { |
||
| 39 | /** @var SchemaInterface $schema */ |
||
| 40 | $schema = $this->schemaRegistry->get($schemaAlias); |
||
| 41 | |||
| 42 | if ($schema instanceof SchemaFormOptionsInterface) { |
||
| 43 | $options = array_merge($schema->getOptions(), $options); |
||
| 44 | } |
||
| 45 | |||
| 46 | $builder = $this->formFactory->createBuilder( |
||
| 47 | FormType::class, |
||
| 48 | $data, |
||
| 49 | array_merge_recursive( |
||
| 50 | ['data_class' => null], |
||
| 51 | $options |
||
| 52 | ) |
||
| 53 | ); |
||
| 54 | |||
| 55 | $schema->buildForm($builder); |
||
| 56 | |||
| 57 | return $builder->getForm(); |
||
| 58 | } |
||
| 60 |