| Conditions | 4 |
| Paths | 6 |
| Total Lines | 24 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | protected function configureFormFields(FormMapper $formMapper) |
||
| 24 | { |
||
| 25 | $link_parameters = array(); |
||
| 26 | |||
| 27 | if ($this->hasParentFieldDescription()) { |
||
| 28 | $link_parameters = $this->getParentFieldDescription()->getOption('link_parameters', array()); |
||
| 29 | } |
||
| 30 | |||
| 31 | if ($this->hasRequest()) { |
||
| 32 | $context = $this->getRequest()->get('context', null); |
||
| 33 | |||
| 34 | if (null !== $context) { |
||
| 35 | $link_parameters['context'] = $context; |
||
| 36 | } |
||
| 37 | } |
||
| 38 | |||
| 39 | $formMapper |
||
| 40 | ->add('media', 'sonata_type_model_list', array('required' => false), array( |
||
| 41 | 'link_parameters' => $link_parameters, |
||
| 42 | )) |
||
| 43 | ->add('enabled', null, array('required' => false)) |
||
| 44 | ->add('position', 'hidden') |
||
| 45 | ; |
||
| 46 | } |
||
| 47 | |||
| 61 |