original_string: private function addMainFieldset(FormInterface $form)
      {
          $mainData = $form->addChild($this->getElement('nested_fieldset', [
              'name'  => 'main_data',
              'label' => 'common.fieldset.general',
          ]));
          
          $languageData = $mainData->addChild($this->getElement('language_fieldset', [
              'name'        => 'translations',
              'label'       => 'common.fieldset.translations',
              'transformer' => $this->getRepositoryTransformer('translation', $this->get('page.repository')),
          ]));
          
          $name = $languageData->addChild($this->getElement('text_field', [
              'name'  => 'name',
              'label' => 'common.label.name',
              'rules' => [
                  $this->getRule('required'),
              ],
          ]));
          
          $languageData->addChild($this->getElement('slug_field', [
              'name'            => 'slug',
              'label'           => 'common.label.slug',
              'name_field'      => $name,
              'generate_route'  => 'route.generate',
              'translatable_id' => $this->getRequestHelper()->getAttributesBagParam('id'),
              'rules'           => [
                  $this->getRule('required'),
              ],
          ]));
          
          $mainData->addChild($this->getElement('checkbox', [
              'name'    => 'publish',
              'label'   => 'common.label.publish',
              'comment' => 'page.comment.publish',
              'default' => 1,
          ]));
          
          $mainData->addChild($this->getElement('text_field', [
              'name'  => 'hierarchy',
              'label' => 'common.label.hierarchy',
              'rules' => [
                  $this->getRule('required'),
              ],
          ]));
          
          $mainData->addChild($this->getElement('text_field', [
              'name'  => 'section',
              'label' => 'page.label.section',
          ]));
          
          $mainData->addChild($this->getElement('tree', [
              'name'        => 'parent',
              'label'       => 'page.label.parent',
              'choosable'   => true,
              'selectable'  => false,
              'sortable'    => false,
              'clickable'   => false,
              'items'       => $this->get('page.dataset.admin')->getResult('flat_tree'),
              'restrict'    => $this->getRequestHelper()->getAttributesBagParam('id'),
              'transformer' => $this->getRepositoryTransformer('entity', $this->get('page.repository')),
          ]));
          
          $mainData->addChild($this->getElement('tip', [
              'tip' => $this->trans('page.tip.client_groups'),
          ]));
          
          $mainData->addChild($this->getElement('multi_select', [
              'name'        => 'clientGroups',
              'label'       => 'page.label.client_groups',
              'options'     => $this->get('client_group.dataset.admin')->getResult('select'),
              'transformer' => $this->getRepositoryTransformer('collection', $this->get('client_group.repository')),
          ]));
      }
code: private function addMainFieldset(FormInterface $form)
      {
          $mainData = $form->addChild($this->getElement('nested_fieldset', [
              'name'  => 'main_data',
              'label' => 'common.fieldset.general',
          ]));
          
          $languageData = $mainData->addChild($this->getElement('language_fieldset', [
              'name'        => 'translations',
              'label'       => 'common.fieldset.translations',
              'transformer' => $this->getRepositoryTransformer('translation', $this->get('page.repository')),
          ]));
          
          $name = $languageData->addChild($this->getElement('text_field', [
              'name'  => 'name',
              'label' => 'common.label.name',
              'rules' => [
                  $this->getRule('required'),
              ],
          ]));
          
          $languageData->addChild($this->getElement('slug_field', [
              'name'            => 'slug',
              'label'           => 'common.label.slug',
              'name_field'      => $name,
              'generate_route'  => 'route.generate',
              'translatable_id' => $this->getRequestHelper()->getAttributesBagParam('id'),
              'rules'           => [
                  $this->getRule('required'),
              ],
          ]));
          
          $mainData->addChild($this->getElement('checkbox', [
              'name'    => 'publish',
              'label'   => 'common.label.publish',
              'comment' => 'page.comment.publish',
              'default' => 1,
          ]));
          
          $mainData->addChild($this->getElement('text_field', [
              'name'  => 'hierarchy',
              'label' => 'common.label.hierarchy',
              'rules' => [
                  $this->getRule('required'),
              ],
          ]));
          
          $mainData->addChild($this->getElement('text_field', [
              'name'  => 'section',
              'label' => 'page.label.section',
          ]));
          
          $mainData->addChild($this->getElement('tree', [
              'name'        => 'parent',
              'label'       => 'page.label.parent',
              'choosable'   => true,
              'selectable'  => false,
              'sortable'    => false,
              'clickable'   => false,
              'items'       => $this->get('page.dataset.admin')->getResult('flat_tree'),
              'restrict'    => $this->getRequestHelper()->getAttributesBagParam('id'),
              'transformer' => $this->getRepositoryTransformer('entity', $this->get('page.repository')),
          ]));
          
          $mainData->addChild($this->getElement('tip', [
              'tip' => $this->trans('page.tip.client_groups'),
          ]));
          
          $mainData->addChild($this->getElement('multi_select', [
              'name'        => 'clientGroups',
              'label'       => 'page.label.client_groups',
              'options'     => $this->get('client_group.dataset.admin')->getResult('select'),
              'transformer' => $this->getRepositoryTransformer('collection', $this->get('client_group.repository')),
          ]));
      }
code_tokens: private function addMainFieldset ( FormInterface $ form ) { $ mainData = $ form -> addChild ( $ this -> getElement ( 'nested_fieldset' , [ 'name' => 'main_data' , 'label' => 'common.fieldset.general' , ] ) ) ; $ languageData = $ mainData -> addChild ( $ this -> getElement ( 'language_fieldset' , [ 'name' => 'translations' , 'label' => 'common.fieldset.translations' , 'transformer' => $ this -> getRepositoryTransformer ( 'translation' , $ this -> get ( 'page.repository' ) ) , ] ) ) ; $ name = $ languageData -> addChild ( $ this -> getElement ( 'text_field' , [ 'name' => 'name' , 'label' => 'common.label.name' , 'rules' => [ $ this -> getRule ( 'required' ) , ] , ] ) ) ; $ languageData -> addChild ( $ this -> getElement ( 'slug_field' , [ 'name' => 'slug' , 'label' => 'common.label.slug' , 'name_field' => $ name , 'generate_route' => 'route.generate' , 'translatable_id' => $ this -> getRequestHelper ( ) -> getAttributesBagParam ( 'id' ) , 'rules' => [ $ this -> getRule ( 'required' ) , ] , ] ) ) ; $ mainData -> addChild ( $ this -> getElement ( 'checkbox' , [ 'name' => 'publish' , 'label' => 'common.label.publish' , 'comment' => 'page.comment.publish' , 'default' => 1 , ] ) ) ; $ mainData -> addChild ( $ this -> getElement ( 'text_field' , [ 'name' => 'hierarchy' , 'label' => 'common.label.hierarchy' , 'rules' => [ $ this -> getRule ( 'required' ) , ] , ] ) ) ; $ mainData -> addChild ( $ this -> getElement ( 'text_field' , [ 'name' => 'section' , 'label' => 'page.label.section' , ] ) ) ; $ mainData -> addChild ( $ this -> getElement ( 'tree' , [ 'name' => 'parent' , 'label' => 'page.label.parent' , 'choosable' => true , 'selectable' => false , 'sortable' => false , 'clickable' => false , 'items' => $ this -> get ( 'page.dataset.admin' ) -> getResult ( 'flat_tree' ) , 'restrict' => $ this -> getRequestHelper ( ) -> getAttributesBagParam ( 'id' ) , 'transformer' => $ this -> getRepositoryTransformer ( 'entity' , $ this -> get ( 'page.repository' ) ) , ] ) ) ; $ mainData -> addChild ( $ this -> getElement ( 'tip' , [ 'tip' => $ this -> trans ( 'page.tip.client_groups' ) , ] ) ) ; $ mainData -> addChild ( $ this -> getElement ( 'multi_select' , [ 'name' => 'clientGroups' , 'label' => 'page.label.client_groups' , 'options' => $ this -> get ( 'client_group.dataset.admin' ) -> getResult ( 'select' ) , 'transformer' => $ this -> getRepositoryTransformer ( 'collection' , $ this -> get ( 'client_group.repository' ) ) , ] ) ) ; }
docstring: Adds main settings fieldset to form
  
  @param FormInterface $form
docstring_tokens: Adds main settings fieldset to form