Bundle/BlogBundle/Form/CategoryType.php
protected function addChildrenField($form)
    {
        $form->add(
            'children',
            CollectionType::class,
            [
                'entry_type'   => self::class,
                'required'     => false,
                'allow_add'    => true,
                'allow_delete' => true,
                'prototype'    => true,
                'by_reference' => false,
            ]
        );
    }
protected function addChildrenField($form)
    {
        $form->add(
            'children',
            CollectionType::class,
            [
                'entry_type'   => self::class,
                'required'     => false,
                'allow_add'    => true,
                'allow_delete' => true,
                'prototype'    => true,
                'by_reference' => false,
            ]
        );
    }
protected function addChildrenField ( $ form ) { $ form -> add ( 'children' , CollectionType :: class , [ 'entry_type' => self :: class , 'required' => false , 'allow_add' => true , 'allow_delete' => true , 'prototype' => true , 'by_reference' => false , ] ) ; }
Add the items field to the form.

@param Form $form
Add the items field to the form .