Sensio\Bundle\GeneratorBundle\Command\GenerateDoctrineCrudCommand::getGenerator PHP Method

getGenerator() protected method

protected getGenerator ( )
    protected function getGenerator()
    {
        if (null === $this->generator) {
            $this->generator = new DoctrineCrudGenerator($this->getContainer()->get('filesystem'), __DIR__.'/../Resources/skeleton/crud');
        }

        return $this->generator;
    }

Usage Example

 protected function getGenerator(BundleInterface $bundle = null)
 {
     $generator = new DevelopatheCrudGenerator($this->getContainer()->get('filesystem'));
     $generator->setSkeletonDirs(__DIR__ . '/../Resources/skeleton');
     $this->setGenerator($generator);
     return parent::getGenerator($bundle);
 }
All Usage Examples Of Sensio\Bundle\GeneratorBundle\Command\GenerateDoctrineCrudCommand::getGenerator