/** * @param string $type * @param string $index * * @return string */ public function retrieveRepositoryFormFragmentAction($type, $index) { $form = $this->getFormFactory()->createNamed('config'); $form->add($this->getFormFactory()->createNamed('repositories')); $form['repositories']->add($this->getFormFactory()->createNamed($index, new RepositoryType())); $form['repositories'][$index]->setData(Repository::create($type)); return $this->app->render('default/retrieveRepositoryFormFragment.html.twig', ['form' => $form['repositories'][$index]->createView()]); }
/** * {@inheritDoc} */ public function doRun(InputInterface $input = null, OutputInterface $output = null) { $env = $input->getParameterOption('--env', null); if (null === $env) { $env = $input->getParameterOption('-e', 'dev'); } $this->app = new SilexApplication($env); $this->app->boot(); return parent::doRun($input, $output); }