0

I'm doing my own Crud Generate in Symfony 2.3. This is my code.

namespace Gotakey\BackendBundle\Command;

use Sensio\Bundle\GeneratorBundle\Generator\DoctrineCrudGenerator;
use Sensio\Bundle\GeneratorBundle\Command\GenerateDoctrineCrudCommand;


class MyDoctrineCrudCommand extends GenerateDoctrineCrudCommand
{

    protected $generator;

    protected function configure()
    {
        parent::configure();

        $this->setName('gotakey:generate:crud');
        $this->setDescription('My Crud generate');

    }

    protected function getGenerator($bundle = null)
    {

        $generator = new DoctrineCrudGenerator($this->getContainer()->get('filesystem'), __DIR__.'/../Resources/crud');
        $this->setGenerator($generator);
        return parent::getGenerator();

    }
}

I have the skeleton in my Bundle /src/Gotakey/BackendBundle/Resources/crud. When I run the command line, Displays the following error.

    [Twig_Error_Loader]
The "" directory does not exist.

Anyone know what I'm doing wrong.

Thanks and sorry for my english. I'm not expert

DavidQ
  • 26
  • 1
  • After much reading, I did. I created a folder with the following structure. APP_PATH/Resources/SensioGeneratorBundle/skeleton/crud/views/. I created the folder with the files views: edit.html.twig.twig, index.html.twig.twig ... More information: http://symfony.com/doc/current/bundles/SensioGeneratorBundle/index.html – DavidQ Jul 07 '13 at 04:04

1 Answers1

0

After much reading, I did. I created a folder with the following structure. APP_PATH/Resources/SensioGeneratorBundle/skeleton/crud/views/.

I created the folder with the files views: edit.html.twig.twig, index.html.twig.twig ...

More information: http://symfony.com/doc/current/bundles/SensioGeneratorBundle/index.html

DavidQ
  • 26
  • 1