equal
deleted
inserted
replaced
27 { |
27 { |
28 parent::configure(); |
28 parent::configure(); |
29 |
29 |
30 $this |
30 $this |
31 ->setName('wikitag:generate-document-class') |
31 ->setName('wikitag:generate-document-class') |
32 ->setDescription('Generate the document class document class') |
32 ->setDescription('Generate the document class') |
33 ->addArgument('path', InputArgument::OPTIONAL, 'The generation path') |
33 ->addArgument('path', InputArgument::OPTIONAL, 'The generation path') |
34 ->addOption("simulate","S",InputOption::VALUE_NONE, "Simulate generation"); |
34 ->addOption("simulate","S",InputOption::VALUE_NONE, "Simulate generation"); |
35 } |
35 } |
36 |
36 |
37 protected function execute(InputInterface $input, OutputInterface $output) |
37 protected function execute(InputInterface $input, OutputInterface $output) |
42 $path = realpath($this->getContainer()->get('kernel')->getRootDir()."/../src"); |
42 $path = realpath($this->getContainer()->get('kernel')->getRootDir()."/../src"); |
43 } |
43 } |
44 |
44 |
45 $definition = new Definition('IRI\Bundle\WikiTagBundle\Entity\Document'); |
45 $definition = new Definition('IRI\Bundle\WikiTagBundle\Entity\Document'); |
46 |
46 |
47 $definition->setParentClass('IRI\Bundle\WikiTagBundle\Model\Document'); |
47 $definition->setParentClass('\IRI\Bundle\WikiTagBundle\Model\Document'); |
48 |
48 |
49 $fields = $this->getContainer()->getParameter('wiki_tag.fields'); |
49 $fields = $this->getContainer()->getParameter('wiki_tag.fields'); |
50 foreach ( $fields as $name => $field_def) |
50 foreach ( $fields as $name => $field_def) |
51 { |
51 { |
52 $property = new Property("private", $name, NULL); |
52 $property = new Property("private", $name, NULL); |