Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
21 | protected function configureFormFields(FormMapper $form) |
||
22 | { |
||
23 | if (!$this->isChild()) { |
||
24 | $form->add('page'); |
||
25 | } else { |
||
26 | $page = $this->getParentFieldDescription()->getAdmin()->getSubject(); |
||
27 | |||
28 | // This fixes a weird bug where the router does not get the correct parameters for the containing page. |
||
29 | $this->getParentFieldDescription()->setOption('link_parameters', array('id' => $page->getId())); |
||
30 | |||
31 | $form |
||
32 | ->add('weight') |
||
33 | ->add('internalName', 'text', array('disabled' => true, 'read_only' => true, 'required' => false)) |
||
34 | ->add('content_item_region', 'zicht_content_item_region', array('container' => $page)) |
||
35 | ->add('content_item_type', 'zicht_content_item_type', array('container' => $page)); |
||
36 | } |
||
68 |