Esempio n. 1
0
 /**
  * Runs the post install commands.
  */
 private function runPostInstallCommands()
 {
     $rootDir = $this->container->getParameter('kernel.root_dir');
     if (is_dir($rootDir . '/../files') && is_link($rootDir . '/../web/assets')) {
         return;
     }
     // Install the bundle assets
     $command = new AssetsInstallCommand();
     $command->setContainer($this->container);
     $command->run(new ArgvInput(['assets:install', '--relative', $rootDir . '/../web']), new NullOutput());
     // Add the Contao directories
     $command = new InstallCommand();
     $command->setContainer($this->container);
     $command->run(new ArgvInput([]), new NullOutput());
     // Generate the symlinks
     $command = new SymlinksCommand();
     $command->setContainer($this->container);
     $command->run(new ArgvInput([]), new NullOutput());
 }
Esempio n. 2
0
 /**
  * Generate the symlinks in the web/ folder
  */
 public function generateSymlinks()
 {
     $container = \System::getContainer();
     $command = new SymlinksCommand();
     $command->setContainer($container);
     $command->run(new ArgvInput(array()), new NullOutput());
 }
Esempio n. 3
0
 /**
  * Generate the symlinks in the web/ folder
  */
 public function generateSymlinks()
 {
     $command = new SymlinksCommand();
     $command->setContainer(\System::getContainer());
     $status = $command->run(new ArgvInput(array()), new NullOutput());
     // Add a log entry
     if ($status > 0) {
         $this->log('The symlinks could not be regenerated', __METHOD__, TL_ERROR);
     } else {
         $this->log('Regenerated the symlinks', __METHOD__, TL_CRON);
     }
 }