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

        if (file_exists($path)) {
            $summary[] = '';
            $summary[] = '<bg=red>Create view already exist.</>';

            return;
        }

        $this->renderFile('crud/create.html.twig.twig',
            $path,
            array(
                'bundle'  => $bundle->getName(),
                'model'   => $this->model,
                'prefix'  => $this->getBundlePrefix($bundle),
                'action'  => strtolower($this->getBundlePrefix($bundle) . '_' . $this->model . '_create'),
                'cancel'  => strtolower($this->getBundlePrefix($bundle) . '_' . $this->model . '_index'),
            )
        );

        $summary[] = '';
        $summary[] = '<bg=green>Create view created.</>';
    }
protected function generateCreateView(AbstractResourceBundle $bundle, &$summary)
    {
        $this->generateFormView($bundle);
        $path = $bundle->getPath() . '/Resources/views/' . $this->model . '/create.html.twig';

        if (file_exists($path)) {
            $summary[] = '';
            $summary[] = '<bg=red>Create view already exist.</>';

            return;
        }

        $this->renderFile('crud/create.html.twig.twig',
            $path,
            array(
                'bundle'  => $bundle->getName(),
                'model'   => $this->model,
                'prefix'  => $this->getBundlePrefix($bundle),
                'action'  => strtolower($this->getBundlePrefix($bundle) . '_' . $this->model . '_create'),
                'cancel'  => strtolower($this->getBundlePrefix($bundle) . '_' . $this->model . '_index'),
            )
        );

        $summary[] = '';
        $summary[] = '<bg=green>Create view created.</>';
    }
protected function generateCreateView ( AbstractResourceBundle $ bundle , & $ summary ) { $ this -> generateFormView ( $ bundle ) ; $ path = $ bundle -> getPath ( ) . '/Resources/views/' . $ this -> model . '/create.html.twig' ; if ( file_exists ( $ path ) ) { $ summary [ ] = '' ; $ summary [ ] = '<bg=red>Create view already exist.</>' ; return ; } $ this -> renderFile ( 'crud/create.html.twig.twig' , $ path , array ( 'bundle' => $ bundle -> getName ( ) , 'model' => $ this -> model , 'prefix' => $ this -> getBundlePrefix ( $ bundle ) , 'action' => strtolower ( $ this -> getBundlePrefix ( $ bundle ) . '_' . $ this -> model . '_create' ) , 'cancel' => strtolower ( $ this -> getBundlePrefix ( $ bundle ) . '_' . $ this -> model . '_index' ) , ) ) ; $ summary [ ] = '' ; $ summary [ ] = '<bg=green>Create view created.</>' ; }
Generate create view

@param AbstractResourceBundle $bundle
Generate create view