src/Sulu/Bundle/WebsiteBundle/Controller/AnalyticsController.php
public function postAction(Request $request, $webspace)
    {
        $data = $request->request->all();
        $data['content'] = $this->buildContent($data);

        $entity = $this->get('sulu_website.analytics.manager')->create($webspace, $data);
        $this->get('doctrine.orm.entity_manager')->flush();
        $this->get('sulu_website.http_cache.clearer')->clear();

        return $this->handleView($this->view($entity, 200));
    }
public function postAction(Request $request, $webspace)
    {
        $data = $request->request->all();
        $data['content'] = $this->buildContent($data);

        $entity = $this->get('sulu_website.analytics.manager')->create($webspace, $data);
        $this->get('doctrine.orm.entity_manager')->flush();
        $this->get('sulu_website.http_cache.clearer')->clear();

        return $this->handleView($this->view($entity, 200));
    }
public function postAction ( Request $ request , $ webspace ) { $ data = $ request -> request -> all ( ) ; $ data [ 'content' ] = $ this -> buildContent ( $ data ) ; $ entity = $ this -> get ( 'sulu_website.analytics.manager' ) -> create ( $ webspace , $ data ) ; $ this -> get ( 'doctrine.orm.entity_manager' ) -> flush ( ) ; $ this -> get ( 'sulu_website.http_cache.clearer' ) -> clear ( ) ; return $ this -> handleView ( $ this -> view ( $ entity , 200 ) ) ; }
Creates a analytics for given webspace.

@param Request $request
@param string $webspace

@return Response
Creates a analytics for given webspace .