refactor(library): move the public pages to Twig
All 18 controllers return ViewResponse; 21 .phtml templates become 17 pages
and 6 components under templates/public/. Two templates nothing rendered
(tagcloud, helpers/printNavPanel) are dropped.
Sources of markup now say so in their contract: ArticleTextRenderer::renderPage()
returns Markup, and Hashtags::getAllStatTags() splits into getTagLinks(): ?Markup
and getTagNames(): array, which were two different things behind one method.
Rating stops building HTML and exposes getRate()/getVotesCount()/getUserVote(),
so the star and the vote form are components and the Plates Assets extension is
no longer a dependency. ViewHelper is gone: it rendered partials through
di(Render::class), and the breadcrumbs it built moved into Tree::printNavPanel().
Two defects the output review turned up are fixed along the way: an (int) cast in
Rating::getRate() discarded half a point, so the star.*-5.gif images were never
used, and an === between an int and a PDO string meant the score a reader had
already given was never preselected.
LibraryAccessMiddleware stays on Plates: a middleware has to return a Response,
and the migrated online/downloads middlewares do the same.
and 6 components under templates/public/. Two templates nothing rendered
(tagcloud, helpers/printNavPanel) are dropped.
Sources of markup now say so in their contract: ArticleTextRenderer::renderPage()
returns Markup, and Hashtags::getAllStatTags() splits into getTagLinks(): ?Markup
and getTagNames(): array, which were two different things behind one method.
Rating stops building HTML and exposes getRate()/getVotesCount()/getUserVote(),
so the star and the vote form are components and the Plates Assets extension is
no longer a dependency. ViewHelper is gone: it rendered partials through
di(Render::class), and the breadcrumbs it built moved into Tree::printNavPanel().
Two defects the output review turned up are fixed along the way: an (int) cast in
Rating::getRate() discarded half a point, so the star.*-5.gif images were never
used, and an === between an int and a PDO string meant the score a reader had
already given was never preselected.
LibraryAccessMiddleware stays on Plates: a middleware has to return a Response,
and the migrated online/downloads middlewares do the same.