API / Minn\Blocks / TemplatePartVariations

TemplatePartVariations final class

Minn\Blocks\TemplatePartVariations · public/minn/src/Minn/Blocks/TemplatePartVariations.php · 41 lines

The template part block's variations as the reference builds them (probes rest-block-types, tabs-and-parts): one per area, the general and the navigation overlay areas aside (by name), carrying the area's label, description and icon, offered in the inserter only while no part variation belongs to it; and one per template part, in the order the parts are listed, offered in the inserter with the part's slug, theme and area as its attributes and its example.

Public

staticareas(array $areas, array $instances): array#

The areas' variations beside the parts' ones.

$areaslist<array<string, mixed>>get_allowed_block_template_part_areas()
$instanceslist<array<string, mixed>>the parts' variations
@return list<array<string, mixed>>
staticinstances(array $areas, array $parts): array#

One variation per template part.

$areaslist<array<string, mixed>>get_allowed_block_template_part_areas()
$partslist<object>get_block_templates() for template parts
@return list<array<string, mixed>>