PostBlocks final readonly class
Minn\Blocks\Dynamic\Theme\PostBlocks · public/minn/src/Minn/Blocks/Dynamic/Theme/PostBlocks.php · 294 lines
The post-* blocks: they render the context's current post.
Uses 29 (show)
Constants and properties
| private | readonly Minn\Content\Posts $posts | Promoted from the constructor. |
| private | readonly Minn\Content\Users $users | Promoted from the constructor. |
| private | readonly Minn\Content\Site $site | Promoted from the constructor. |
| private | readonly Minn\Front\Permalinks $permalinks | Promoted from the constructor. |
Public
Internals 13
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | title(Minn\Blocks\Block $block, Minn\Blocks\Renderer $renderer): string# | |
| private | content(Minn\Blocks\Block $block, Minn\Blocks\Renderer $renderer): string# | In a loop the content stops at the more tag with a "(more…)" link; on its own page it runs whole. A post's content never renders inside itself. |
| private | contentOf(Minn\Blocks\Block $block, Minn\Blocks\Renderer $renderer, Minn\Content\PostRecord $post): string# | |
| private | date(Minn\Blocks\Block $block, Minn\Blocks\Renderer $renderer): string# | |
| private | authorName(Minn\Blocks\Block $block, Minn\Blocks\Renderer $renderer): string# | The post's author's name; with no post to read, on an author archive, the name of the user its author variable names (an empty name when it names none, a list of authors included), as the reference renders it; anywhere else nothing. |
| private | excerpt(Minn\Blocks\Block $block, Minn\Blocks\Renderer $renderer): string# | |
| private | featuredImage(Minn\Blocks\Block $block, Minn\Blocks\Renderer $renderer): string# | |
| private | terms(Minn\Blocks\Block $block, Minn\Blocks\Renderer $renderer): string# | |
| private | navigationLink(Minn\Blocks\Block $block, Minn\Blocks\Renderer $renderer): string# | Off a single post or page there is no neighbour to link: nothing at all. |
| private | termRow(string $taxonomy, int $termId): ?Minn\Content\TermRecord# | |
| private | previewSource(Minn\Content\PostRecord $post, Minn\Front\Resolution $resolution): ?Minn\Content\PostRecord# | On a preview, the post's newest autosave, whoever wrote it, stands in for its stored fields (as _set_preview does). |
| private | target(Minn\Blocks\Block $block): string# | |
| private | open(string $tag, array $classes, Minn\Blocks\Block $block, bool $styleFirst = false, bool $linkColorClass = false): string# |
Nothing matches.