public function displayTermsOfUse(Request $request)
    {
        $toDisplay = $request->query->get('to_display', []);
        $data = [];

        foreach ($this->getApplicationBox()->get_databoxes() as $databox) {
            if (count($toDisplay) > 0 && !in_array($databox->get_sbas_id(), $toDisplay)) {
                continue;
            }

            $cgus = $databox->get_cgus();

            if (!isset($cgus[$this->app['locale']])) {
                continue;
            }

            $data[$databox->get_label($this->app['locale'])] = $cgus[$this->app['locale']]['value'];
        }

        return $this->renderResponse('/prod/TOU.html.twig', [
            'TOUs'        => $data,
            'local_title' => $this->app->trans('Terms of use'),
        ]);
    }
public function displayTermsOfUse(Request $request)
    {
        $toDisplay = $request->query->get('to_display', []);
        $data = [];

        foreach ($this->getApplicationBox()->get_databoxes() as $databox) {
            if (count($toDisplay) > 0 && !in_array($databox->get_sbas_id(), $toDisplay)) {
                continue;
            }

            $cgus = $databox->get_cgus();

            if (!isset($cgus[$this->app['locale']])) {
                continue;
            }

            $data[$databox->get_label($this->app['locale'])] = $cgus[$this->app['locale']]['value'];
        }

        return $this->renderResponse('/prod/TOU.html.twig', [
            'TOUs'        => $data,
            'local_title' => $this->app->trans('Terms of use'),
        ]);
    }
public function displayTermsOfUse ( Request $ request ) { $ toDisplay = $ request -> query -> get ( 'to_display' , [ ] ) ; $ data = [ ] ; foreach ( $ this -> getApplicationBox ( ) -> get_databoxes ( ) as $ databox ) { if ( count ( $ toDisplay ) > 0 && ! in_array ( $ databox -> get_sbas_id ( ) , $ toDisplay ) ) { continue ; } $ cgus = $ databox -> get_cgus ( ) ; if ( ! isset ( $ cgus [ $ this -> app [ 'locale' ] ] ) ) { continue ; } $ data [ $ databox -> get_label ( $ this -> app [ 'locale' ] ) ] = $ cgus [ $ this -> app [ 'locale' ] ] [ 'value' ] ; } return $ this -> renderResponse ( '/prod/TOU.html.twig' , [ 'TOUs' => $ data , 'local_title' => $ this -> app -> trans ( 'Terms of use' ) , ] ) ; }
Display database terms of use

@param  Request     $request
@return Response
Display database terms of use