/** * * * @Route /bundle/installer/upload * * * @param \Slim\Http\Request $request * @param \Slim\Http\Response $response * @param \Slim\Route $route */ public function bundleInstallerUploadAction($request) { $msg = ""; if ($request->file('mybundle') and ($request->file('mybundle')->get('type') == 'application/zip' or $request->file('mybundle')->get('type') == 'application/octet-stream')) { $dir = \Raptor2\InstallerBundle\Importer\BundleImporter::prepareCache(); if ($this->moveUploadFileTo('mybundle', $dir . '/' . $request->file('mybundle')->get('name'))) { $msg = \Raptor2\InstallerBundle\Importer\BundleImporter::proccesBundle($dir . '/' . $request->file('mybundle')->get('name')); } } $local = \Raptor2\InstallerBundle\Importer\BundleImporter::getMetainformation(); $conf = $this->getApp()->getConfigurationLoader()->getConfOption(); if (isset($conf['raptor']['repository'])) { $remote = \Raptor2\InstallerBundle\Importer\BundleImporter::getRemoteMetainformation($conf['raptor']['repository']); $local = array_merge($local, $remote); } return $this->render('@InstallerBundle/installer/index.html.twig', array('modules' => $local, 'message' => $msg)); }