Generator/Template/Crud.php
protected function generateFormView(AbstractResourceBundle $bundle)
    {
        $path = $bundle->getPath() . '/Resources/views/' . $this->model . '/_form.html.twig';

        if (!file_exists($path)) {
            $entityClass = $this->getContainer()->get('doctrine')->getAliasNamespace($this->bundle->getName()) . '\\' . $this->model;
            $metadata = $this->getEntityMetadata($entityClass);

            $this->renderFile('crud/_form.html.twig.twig',
                $bundle->getPath() . '/Resources/views/' . $this->model . '/_form.html.twig',
                array(
                    'fields'  => $this->getFieldsFromMetadata($metadata[0]),
                )
            );
        }
    }
protected function generateFormView(AbstractResourceBundle $bundle)
    {
        $path = $bundle->getPath() . '/Resources/views/' . $this->model . '/_form.html.twig';

        if (!file_exists($path)) {
            $entityClass = $this->getContainer()->get('doctrine')->getAliasNamespace($this->bundle->getName()) . '\\' . $this->model;
            $metadata = $this->getEntityMetadata($entityClass);

            $this->renderFile('crud/_form.html.twig.twig',
                $bundle->getPath() . '/Resources/views/' . $this->model . '/_form.html.twig',
                array(
                    'fields'  => $this->getFieldsFromMetadata($metadata[0]),
                )
            );
        }
    }
protected function generateFormView ( AbstractResourceBundle $ bundle ) { $ path = $ bundle -> getPath ( ) . '/Resources/views/' . $ this -> model . '/_form.html.twig' ; if ( ! file_exists ( $ path ) ) { $ entityClass = $ this -> getContainer ( ) -> get ( 'doctrine' ) -> getAliasNamespace ( $ this -> bundle -> getName ( ) ) . '\\' . $ this -> model ; $ metadata = $ this -> getEntityMetadata ( $ entityClass ) ; $ this -> renderFile ( 'crud/_form.html.twig.twig' , $ bundle -> getPath ( ) . '/Resources/views/' . $ this -> model . '/_form.html.twig' , array ( 'fields' => $ this -> getFieldsFromMetadata ( $ metadata [ 0 ] ) , ) ) ; } }
Generate form view

@param AbstractResourceBundle $bundle
Generate form view