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