API / Minn\Blocks\Dynamic / LatestComments

LatestComments final readonly class

Minn\Blocks\Dynamic\LatestComments · public/minn/src/Minn/Blocks/Dynamic/LatestComments.php · 71 lines

core/latest-comments: the newest approved comments with avatar, meta, and a 20-word excerpt.

Constants and properties

privatereadonly Minn\Db $db

Promoted from the constructor.

privatereadonly Minn\Content\Site $site

Promoted from the constructor.

privatereadonly Minn\Content\Posts $posts

Promoted from the constructor.

privatereadonly Minn\Front\Permalinks $permalinks

Promoted from the constructor.

Public

new__construct(Minn\Db $db, Minn\Content\Site $site, Minn\Content\Posts $posts, Minn\Front\Permalinks $permalinks)#
methodrender(Minn\Blocks\Block $block, Minn\Blocks\Renderer $renderer): string#

The block's HTML.

Internals 1

Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.

privateexcerpt(string $content): string#

The first twenty words, with an ellipsis when there were more.