API / Minn\Runtime / BlockTemplates

BlockTemplates final class

Minn\Runtime\BlockTemplates · public/minn/src/Minn/Runtime/BlockTemplates.php · 67 lines

Block templates plugins register at runtime, by their namespaced name ("plugin//slug"). A theme file or a saved template of the same slug wins; otherwise the registered content renders for that slug.

Constants and properties

privatearray $templates

Public

methodregister(string $name, array $args): array|string#

The registered row, or the refusal code the reference reports.

methodunregister(string $name): ?array#

Forgets a registered template; the row, or null.

methodall(): array#

Every registered template.

@return array<string, array<string, mixed>> by registered name
methodget(string $name): ?array#

One registered template, or null.

methodbySlug(string $slug): ?array#

A registered template by slug, or null.