function index(Application $app)
 {
     $grb = new CuratedListRepositoryBuilder();
     $grb->setSite($app['currentSite']);
     $grb->setIncludeDeleted(false);
     $lists = $grb->fetchAll();
     return $app['twig']->render('site/curatedlistlist/index.html.twig', array('curatedlists' => $lists));
 }
 function index($siteid, Request $request, Application $app)
 {
     $sr = new SiteRepository();
     $site = $sr->loadById($siteid);
     if (!$site) {
         die("404");
     }
     $rb = new CuratedListRepositoryBuilder();
     $rb->setSite($site);
     $curatedlists = $rb->fetchAll();
     return $app['twig']->render('sysadmin/curatedlistlist/index.html.twig', array('site' => $site, 'curatedlists' => $curatedlists));
 }
 function editCuratedLists($slug, Request $request, Application $app)
 {
     if (!$this->build($slug, $request, $app)) {
         $app->abort(404, "Group does not exist.");
     }
     if ($this->parameters['group']->getIsDeleted()) {
         die("No");
         // TODO
     }
     $clrb = new CuratedListRepositoryBuilder();
     $clrb->setSite($app['currentSite']);
     $clrb->setUserCanEdit($app['currentUser']);
     $clrb->setIncludeDeleted(false);
     $clrb->setGroupInformation($this->parameters['group']);
     $this->parameters['curatedListsUserCanEdit'] = $clrb->fetchAll();
     return $app['twig']->render('site/group/edit.curatedlists.html.twig', $this->parameters);
 }