API / Minn\Blocks\Dynamic\Theme / Structure

Structure final readonly class

Minn\Blocks\Dynamic\Theme\Structure · public/minn/src/Minn/Blocks/Dynamic/Theme/Structure.php · 105 lines

template-part, pattern, site-title, site-tagline, site-logo.

Constants and properties

privatereadonly Minn\Theme\Theme $theme

Promoted from the constructor.

privatereadonly Minn\Theme\Templates $templates

Promoted from the constructor.

privatereadonly Minn\Content\Site $site

Promoted from the constructor.

privatereadonly Minn\Front\Permalinks $permalinks

Promoted from the constructor.

Public

new__construct(Minn\Theme\Theme $theme, Minn\Theme\Templates $templates, Minn\Content\Site $site, Minn\Front\Permalinks $permalinks)#
methodregister(Minn\Blocks\Renderer $renderer): void#

Registers this family's blocks with the renderer.

Internals 5

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

privatetemplatePart(Minn\Blocks\Block $block, Minn\Blocks\Renderer $renderer): string#

The wrapper element follows the part's area: header, footer, or a div.

privateannouncePart(Minn\Blocks\Block $block, string $slug, string $source, string|int $where, ?string $markup): void#

Tells plugins where a template part came from, as the reference does as it renders one: render_block_core_template_part_post (with the saved part), _file (with the theme file's path) or _none.

privatepattern(Minn\Blocks\Block $block, Minn\Blocks\Renderer $renderer): string#
privatesiteTitle(Minn\Blocks\Block $block, Minn\Blocks\Renderer $renderer): string#
privatesiteTagline(Minn\Blocks\Block $block): string#