public function getCreateForm ($requestOrDataArray, array $options=array(), $entity=false)
    {
        $formBuilder = $this->Core->getFormFactory();
        if (false === $entity) {
            $newEntity = new $this->entityClass();
        } else {
            $newEntity = $entity;
        }
        $createForm  = $formBuilder->create(new $this->createFormClass(), $newEntity, $options);

        // Bind request data to form
        if (is_array($requestOrDataArray)) {
            $createForm->submit($requestOrDataArray);
        } else {
            $createForm->handleRequest($requestOrDataArray);
        }

        return $createForm;
    }
public function getCreateForm ($requestOrDataArray, array $options=array(), $entity=false)
    {
        $formBuilder = $this->Core->getFormFactory();
        if (false === $entity) {
            $newEntity = new $this->entityClass();
        } else {
            $newEntity = $entity;
        }
        $createForm  = $formBuilder->create(new $this->createFormClass(), $newEntity, $options);

        // Bind request data to form
        if (is_array($requestOrDataArray)) {
            $createForm->submit($requestOrDataArray);
        } else {
            $createForm->handleRequest($requestOrDataArray);
        }

        return $createForm;
    }
public function getCreateForm ( $ requestOrDataArray , array $ options = array ( ) , $ entity = false ) { $ formBuilder = $ this -> Core -> getFormFactory ( ) ; if ( false === $ entity ) { $ newEntity = new $ this -> entityClass ( ) ; } else { $ newEntity = $ entity ; } $ createForm = $ formBuilder -> create ( new $ this -> createFormClass ( ) , $ newEntity , $ options ) ; // Bind request data to form if ( is_array ( $ requestOrDataArray ) ) { $ createForm -> submit ( $ requestOrDataArray ) ; } else { $ createForm -> handleRequest ( $ requestOrDataArray ) ; } return $ createForm ; }
Instantiate createForm, populate it with request data if applicable

@param    \Symfony\Component\HttpFoundation\Request object or data array
@return   Model\DomainModel
Instantiate createForm populate it with request data if applicable