| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 35 | protected static function createForm(EntityInterface $entity, Admin $app, $id = null) |
||
| 36 | { |
||
| 37 | $form = F::form() |
||
| 38 | ->method('post') |
||
| 39 | ->enctype('multipart/form-data') |
||
| 40 | ->add([ |
||
| 41 | 'entity' => F::hidden()->val($entity->getName())->class('field-data-entity'), |
||
| 42 | 'data' => $entity->getScheme($app['builder']), |
||
| 43 | ]); |
||
| 44 | |||
| 45 | if ($id !== null) { |
||
| 46 | $form['id'] = F::hidden()->val($id)->class('field-data-id'); |
||
| 47 | } |
||
| 48 | |||
| 49 | return $form; |
||
| 50 | } |
||
| 51 | } |
||
| 52 |