Exemplo n.º 1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $this->echoLog = FALSE;
     parent::execute($input, $output);
     try {
         $this->doCompile($input, $output);
         $output->writeln('validating...');
         $code = $this->callCommand('orm:validate-schema', array(), $output);
         if (($con = $input->getOption('con')) != NULL) {
             try {
                 $code = $this->callCommand('orm:update-schema', array('--dry-run' => false, '--con' => $con), $output);
             } catch (\PDOException $e) {
                 $this->comment('PDOException für folgende Befehle');
                 $output->writeln($this->callCommand('orm:update-schema', array('--dry-run' => true, '--con' => $con), $output));
                 throw $e;
             }
         }
         $output->writeln('done.');
         return 0;
     } catch (\Exception $e) {
         $output->writeln('<error>ERROR: Beim Compilen sind Fehler aufgetreten: ' . $e->getMessage() . '</error>');
         throw $e;
         return 1;
     }
 }
 protected function configure()
 {
     $this->setName('cms:create-cs-widget');
     $this->addArgument('name', self::REQUIRED, 'name of widget in CamelCase');
     $this->addArgument('contexts', self::OPTIONAL | self::IS_ARRAY, 'where to show the widget in layoutManager values: sidebar-content|page-content');
     $this->addOption('section', '', self::VALUE_REQUIRED, 'section of widget in layoutManager (class-name)');
     $this->addOption('label', '', self::VALUE_REQUIRED, 'label for button control');
     $this->setDescription('Creates a new ContentStream Widget Template (and an Entity for that)');
     parent::configure();
 }
 protected function configure()
 {
     parent::configure();
     $this->setName('compile:test-entities')->setDescription('Erstellt alle Test Entities in Psc\\Doctrine\\TestEntities');
     $this->addOption('filter');
 }