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));
 }
 public function getParameters()
 {
     $parameters = array();
     $curatedListRepoBuilder = new CuratedListRepositoryBuilder();
     $curatedListRepoBuilder->setContainsEvent($this->parameters['event']);
     $curatedListRepoBuilder->setIncludeDeleted(false);
     $parameters['curatedLists'] = $curatedListRepoBuilder->fetchAll();
     return $parameters;
 }
 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);
 }
 function show($slug, Request $request, Application $app)
 {
     if (!$this->build($slug, $request, $app)) {
         $app->abort(404, "Group does not exist.");
     }
     $this->parameters['eventListFilterParams'] = new EventFilterParams();
     $this->parameters['eventListFilterParams']->set($_GET);
     $this->parameters['eventListFilterParams']->getEventRepositoryBuilder()->setGroup($this->parameters['group']);
     $this->parameters['eventListFilterParams']->getEventRepositoryBuilder()->setIncludeAreaInformation(true);
     $this->parameters['eventListFilterParams']->getEventRepositoryBuilder()->setIncludeVenueInformation(true);
     $this->parameters['eventListFilterParams']->getEventRepositoryBuilder()->setIncludeMediasSlugs(true);
     if ($app['currentUser']) {
         $this->parameters['eventListFilterParams']->getEventRepositoryBuilder()->setUserAccount($app['currentUser'], true);
     }
     $this->parameters['events'] = $this->parameters['eventListFilterParams']->getEventRepositoryBuilder()->fetchAll();
     $mrb = new MediaRepositoryBuilder();
     $mrb->setIncludeDeleted(false);
     $mrb->setSite($app['currentSite']);
     $mrb->setGroup($this->parameters['group']);
     $this->parameters['medias'] = $mrb->fetchAll();
     // we only want to link to these if there are any
     $importurlRepoBuilder = new ImportURLRepositoryBuilder();
     $importurlRepoBuilder->setGroup($this->parameters['group']);
     $this->parameters['importurls'] = $importurlRepoBuilder->fetchAll();
     $groupRepo = new GroupRepository();
     if (!$this->parameters['group']->getIsDeleted() && $app['currentUserPermissions']->hasPermission("org.openacalendar", "CALENDAR_CHANGE") && $app['currentSite']->getIsFeatureGroup()) {
         $this->parameters['isGroupRunningOutOfFutureEvents'] = $groupRepo->isGroupRunningOutOfFutureEvents($this->parameters['group'], $app['currentSite']);
     } else {
         $this->parameters['isGroupRunningOutOfFutureEvents'] = 0;
     }
     $curatedListRepoBuilder = new CuratedListRepositoryBuilder();
     $curatedListRepoBuilder->setContainsGroup($this->parameters['group']);
     $curatedListRepoBuilder->setIncludeDeleted(false);
     $this->parameters['curatedLists'] = $curatedListRepoBuilder->fetchAll();
     return $app['twig']->render('site/group/show.html.twig', $this->parameters);
 }