src/Phlexible/Bundle/SiterootBundle/Controller/SiterootController.php
public function listAction()
    {
        $siterootManager = $this->get('phlexible_siteroot.siteroot_manager');

        $siteroots = [];
        foreach ($siterootManager->findAll() as $siteroot) {
            $siteroots[] = [
                'id' => $siteroot->getId(),
                'title' => $siteroot->getTitle(),
            ];
        }

        return new JsonResponse([
            'siteroots' => $siteroots,
            'count' => count($siteroots),
        ]);
    }
public function listAction()
    {
        $siterootManager = $this->get('phlexible_siteroot.siteroot_manager');

        $siteroots = [];
        foreach ($siterootManager->findAll() as $siteroot) {
            $siteroots[] = [
                'id' => $siteroot->getId(),
                'title' => $siteroot->getTitle(),
            ];
        }

        return new JsonResponse([
            'siteroots' => $siteroots,
            'count' => count($siteroots),
        ]);
    }
public function listAction ( ) { $ siterootManager = $ this -> get ( 'phlexible_siteroot.siteroot_manager' ) ; $ siteroots = [ ] ; foreach ( $ siterootManager -> findAll ( ) as $ siteroot ) { $ siteroots [ ] = [ 'id' => $ siteroot -> getId ( ) , 'title' => $ siteroot -> getTitle ( ) , ] ; } return new JsonResponse ( [ 'siteroots' => $ siteroots , 'count' => count ( $ siteroots ) , ] ) ; }
List siteroots.

@return JsonResponse
@Route("/list", name="siteroots_siteroot_list")
List siteroots .