Sensio\Bundle\GeneratorBundle\Generator\DoctrineFormGenerator::getClassPath PHP Method

getClassPath() public method

public getClassPath ( )
    public function getClassPath()
    {
        return $this->classPath;
    }

Usage Example

 /**
  * @see Command
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $entity = Validators::validateEntityName($input->getArgument('entity'));
     list($bundle, $entity) = $this->parseShortcutNotation($entity);
     $entityClass = $this->getContainer()->get('doctrine')->getEntityNamespace($bundle) . '\\' . $entity;
     $metadata = $this->getEntityMetadata($entityClass);
     $bundle = $this->getApplication()->getKernel()->getBundle($bundle);
     $generator = new DoctrineFormGenerator($this->getContainer()->get('filesystem'), __DIR__ . '/../Resources/skeleton/form');
     $generator->generate($bundle, $entity, $metadata[0]);
     $output->writeln(sprintf('The new %s.php class file has been created under %s.', $generator->getClassName(), $generator->getClassPath()));
 }