Controller/UserController.php
private function createCreateForm(User $entity)
    {
        $form = $this->createForm(new UserType(), $entity, array(
            'action' => $this->generateUrl('admin_user_create'),
            'method' => 'POST',
            'is_creation' => true
        ));

        $form->add('submit', 'submit', array('label' => 'Create'));

        return $form;
    }
private function createCreateForm(User $entity)
    {
        $form = $this->createForm(new UserType(), $entity, array(
            'action' => $this->generateUrl('admin_user_create'),
            'method' => 'POST',
            'is_creation' => true
        ));

        $form->add('submit', 'submit', array('label' => 'Create'));

        return $form;
    }
private function createCreateForm ( User $ entity ) { $ form = $ this -> createForm ( new UserType ( ) , $ entity , array ( 'action' => $ this -> generateUrl ( 'admin_user_create' ) , 'method' => 'POST' , 'is_creation' => true ) ) ; $ form -> add ( 'submit' , 'submit' , array ( 'label' => 'Create' ) ) ; return $ form ; }
Creates a form to create a User entity.

@param User $entity The entity

@return \Symfony\Component\Form\Form The form
Creates a form to create a User entity .