namespace Shaarli\Front\Controller\Visitor;
use Shaarli\Front\Exception\ThumbnailsDisabledException;
+use Shaarli\Render\TemplatePage;
use Shaarli\Thumbnailer;
use Slim\Http\Request;
use Slim\Http\Response;
}
}
- $data = $this->executeHooks($linksToDisplay);
+ $data = ['linksToDisplay' => $linksToDisplay];
+ $this->executePageHooks('render_picwall', $data, TemplatePage::PICTURE_WALL);
+
foreach ($data as $key => $value) {
$this->assignView($key, $value);
}
- return $response->write($this->render('picwall'));
- }
-
- /**
- * @param mixed[] $linksToDisplay List of formatted bookmarks
- *
- * @return mixed[] Template data after active plugins render_picwall hook execution.
- */
- protected function executeHooks(array $linksToDisplay): array
- {
- $data = [
- 'linksToDisplay' => $linksToDisplay,
- ];
- $this->container->pluginManager->executeHooks(
- 'render_picwall',
- $data,
- ['loggedin' => $this->container->loginManager->isLoggedIn()]
- );
-
- return $data;
+ return $response->write($this->render(TemplatePage::PICTURE_WALL));
}
}