Author: Yohan Giarelli (yohan@frequence-web.fr)
Inheritance: extends Silex\Application, use trait Silex\Application\MonologTrait, use trait Silex\Application\SecurityTrait, use trait Silex\Application\TwigTrait, use trait Silex\Application\UrlGeneratorTrait
Exemplo n.º 1
0
 /**
  * @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()]);
 }
Exemplo n.º 2
0
 /**
  * {@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);
 }