container->conf->get('thumbnails.mode', Thumbnailer::MODE_NONE) === Thumbnailer::MODE_NONE) { throw new ThumbnailsDisabledException(); } $this->assignView( 'pagetitle', t('Picture wall') . ' - ' . $this->container->conf->get('general.title', 'Shaarli') ); // Optionally filter the results: $bookmarks = $this->container->bookmarkService->search($request->getQueryParams())->getBookmarks(); $links = []; // Get only bookmarks which have a thumbnail. // Note: we do not retrieve thumbnails here, the request is too heavy. $formatter = $this->container->formatterFactory->getFormatter('raw'); foreach ($bookmarks as $key => $bookmark) { if (!empty($bookmark->getThumbnail())) { $links[] = $formatter->format($bookmark); } } $data = ['linksToDisplay' => $links]; $this->executePageHooks('render_picwall', $data, TemplatePage::PICTURE_WALL); foreach ($data as $key => $value) { $this->assignView($key, $value); } return $response->write($this->render(TemplatePage::PICTURE_WALL)); } }