public function whatYouWantAction(Request $request)
    {
        // app already installed
        if ($this->container->getParameter('anime_db.catalog.installed')) {
            return $this->redirect($this->generateUrl('home'));
        }

        $response = $this->getCacheTimeKeeper()->getResponse();
        // response was not modified for this request
        if ($response->isNotModified($request)) {
            return $response;
        }

        if ($request->isMethod('POST')) {
            $storage = $this->getRepository()->getLast();
            $this->get('event_dispatcher')->dispatch(StoreEvents::INSTALL_SAMPLES, new SamplesInstall($storage));

            return $this->redirect($this->generateUrl('install_end_skip', ['from' => 'install_sample']));
        }

        return $this->render('AnimeDbCatalogBundle:Install:what_you_want.html.twig', [
            'guide' => $this->get('anime_db.api.client')->getSiteUrl(self::GUIDE_LINK_SCAN),
        ], $response);
    }
public function whatYouWantAction(Request $request)
    {
        // app already installed
        if ($this->container->getParameter('anime_db.catalog.installed')) {
            return $this->redirect($this->generateUrl('home'));
        }

        $response = $this->getCacheTimeKeeper()->getResponse();
        // response was not modified for this request
        if ($response->isNotModified($request)) {
            return $response;
        }

        if ($request->isMethod('POST')) {
            $storage = $this->getRepository()->getLast();
            $this->get('event_dispatcher')->dispatch(StoreEvents::INSTALL_SAMPLES, new SamplesInstall($storage));

            return $this->redirect($this->generateUrl('install_end_skip', ['from' => 'install_sample']));
        }

        return $this->render('AnimeDbCatalogBundle:Install:what_you_want.html.twig', [
            'guide' => $this->get('anime_db.api.client')->getSiteUrl(self::GUIDE_LINK_SCAN),
        ], $response);
    }
public function whatYouWantAction ( Request $ request ) { // app already installed if ( $ this -> container -> getParameter ( 'anime_db.catalog.installed' ) ) { return $ this -> redirect ( $ this -> generateUrl ( 'home' ) ) ; } $ response = $ this -> getCacheTimeKeeper ( ) -> getResponse ( ) ; // response was not modified for this request if ( $ response -> isNotModified ( $ request ) ) { return $ response ; } if ( $ request -> isMethod ( 'POST' ) ) { $ storage = $ this -> getRepository ( ) -> getLast ( ) ; $ this -> get ( 'event_dispatcher' ) -> dispatch ( StoreEvents :: INSTALL_SAMPLES , new SamplesInstall ( $ storage ) ) ; return $ this -> redirect ( $ this -> generateUrl ( 'install_end_skip' , [ 'from' => 'install_sample' ] ) ) ; } return $ this -> render ( 'AnimeDbCatalogBundle:Install:what_you_want.html.twig' , [ 'guide' => $ this -> get ( 'anime_db.api.client' ) -> getSiteUrl ( self :: GUIDE_LINK_SCAN ) , ] , $ response ) ; }
What you want.

@param Request $request

@return Response
What you want .