+ /*header('Content-Type: text/plain');
+ var_dump($this->context['albums']);
+ exit;*/
+
+ //Create response
+ $response = new Response();
+
+ //With logged user
+ if ($this->checker->isGranted('IS_AUTHENTICATED_REMEMBERED')) {
+ //Set last modified
+ $response->setLastModified(new \DateTime('-1 year'));
+
+ //Set as private
+ $response->setPrivate();
+ //Without logged user
+ } else {
+ //Set etag
+ //XXX: only for public to force revalidation by last modified
+ $response->setEtag(md5(serialize($this->context['albums'])));
+
+ //Set last modified
+ $response->setLastModified($this->modified);
+
+ //Set as public
+ $response->setPublic();
+
+ //Without role and modification
+ if ($response->isNotModified($request)) {
+ //Return 304 response
+ return $response;
+ }
+ }
+
+ //Set keywords
+ /*$this->context['head']['keywords'] = implode(
+ ', ',
+ //Use closure to extract each unique article keywords sorted
+ (function ($t) {
+ //Return array
+ $r = [];
+
+ //Iterate on articles
+ foreach($t as $a) {
+ //Non empty keywords
+ if (!empty($a['keywords'])) {
+ //Iterate on keywords
+ foreach($a['keywords'] as $k) {
+ //Set keyword
+ $r[$k['title']] = $k['title'];
+ }
+ }
+ }
+
+ //Sort array
+ sort($r);
+
+ //Return array
+ return $r;
+ })($this->context['articles'])
+ );
+ //Get albums
+ $this->context['albums'] = $this->config['albums'];*/
+
+ //Return rendered response
+ return $this->render('@RapsysTree/index.html.twig', $this->context, $response);