public function addFormFields(FormBuilderInterface $builder, FormInterface $form, $defaults)
{
$fieldset = $this->getFieldset($builder, $form);
$accessor = $this->getPropertyAccessor();
$fieldset->addChild($builder->getElement('tip', ['tip' => $this->trans('Choose categories which should be not visible in box.')]));
$exclude = $fieldset->addChild($builder->getElement('tree', ['name' => 'exclude', 'label' => $this->trans('category.label.exclude'), 'choosable' => false, 'selectable' => true, 'sortable' => false, 'clickable' => false, 'items' => $this->get('category.dataset.admin')->getResult('flat_tree'), 'transformer' => $builder->getRepositoryTransformer('entity', $this->get('category.repository'))]));
$exclude->setValue($accessor->getValue($defaults, '[exclude]'));
}