src/Slashworks/BackendBundle/Controller/InstallController.php
public function processInstallAction(Request $request)
        {

            // include symfony requirements class
            $sAppPath = $this->getParameter('kernel.root_dir');
            require_once $sAppPath.'/SymfonyRequirements.php';


            // prevent from being called directly after install...
            if ($this->container->getParameter('database_password') !== null) {
                return $this->redirect($this->generateUrl('login'));
            }

            // get form type for validation
            $form = $this->createForm(new InstallType(), null, array('action' => $this->generateUrl('install_process')));
            $form->handleRequest($request);

            if ($form->isValid()) {

                try {
                    // get data and do install
                    $aData = $request->request->all();
                    InstallHelper::doInstall($this->container, $aData);

                    // goto login if successful
                    return $this->redirect($this->generateUrl('login'));
                } catch (\Exception $e) {
                    return $this->render('SlashworksBackendBundle:Install:install.html.twig', array("form" => $form->createView(), "error" => true, "errorMessage" => $e->getMessage()));
                }
            } else {
                return $this->render('SlashworksBackendBundle:Install:install.html.twig', array("form" => $form->createView(), "error" => true, "errorMessage" => false));
            }
        }
public function processInstallAction(Request $request)
        {

            // include symfony requirements class
            $sAppPath = $this->getParameter('kernel.root_dir');
            require_once $sAppPath.'/SymfonyRequirements.php';


            // prevent from being called directly after install...
            if ($this->container->getParameter('database_password') !== null) {
                return $this->redirect($this->generateUrl('login'));
            }

            // get form type for validation
            $form = $this->createForm(new InstallType(), null, array('action' => $this->generateUrl('install_process')));
            $form->handleRequest($request);

            if ($form->isValid()) {

                try {
                    // get data and do install
                    $aData = $request->request->all();
                    InstallHelper::doInstall($this->container, $aData);

                    // goto login if successful
                    return $this->redirect($this->generateUrl('login'));
                } catch (\Exception $e) {
                    return $this->render('SlashworksBackendBundle:Install:install.html.twig', array("form" => $form->createView(), "error" => true, "errorMessage" => $e->getMessage()));
                }
            } else {
                return $this->render('SlashworksBackendBundle:Install:install.html.twig', array("form" => $form->createView(), "error" => true, "errorMessage" => false));
            }
        }
public function processInstallAction ( Request $ request ) { // include symfony requirements class $ sAppPath = $ this -> getParameter ( 'kernel.root_dir' ) ; require_once $ sAppPath . '/SymfonyRequirements.php' ; // prevent from being called directly after install... if ( $ this -> container -> getParameter ( 'database_password' ) !== null ) { return $ this -> redirect ( $ this -> generateUrl ( 'login' ) ) ; } // get form type for validation $ form = $ this -> createForm ( new InstallType ( ) , null , array ( 'action' => $ this -> generateUrl ( 'install_process' ) ) ) ; $ form -> handleRequest ( $ request ) ; if ( $ form -> isValid ( ) ) { try { // get data and do install $ aData = $ request -> request -> all ( ) ; InstallHelper :: doInstall ( $ this -> container , $ aData ) ; // goto login if successful return $ this -> redirect ( $ this -> generateUrl ( 'login' ) ) ; } catch ( \ Exception $ e ) { return $ this -> render ( 'SlashworksBackendBundle:Install:install.html.twig' , array ( "form" => $ form -> createView ( ) , "error" => true , "errorMessage" => $ e -> getMessage ( ) ) ) ; } } else { return $ this -> render ( 'SlashworksBackendBundle:Install:install.html.twig' , array ( "form" => $ form -> createView ( ) , "error" => true , "errorMessage" => false ) ) ; } }
Process provided informations and perform installation

@param \Symfony\Component\HttpFoundation\Request $request

@return \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
Process provided informations and perform installation