Editor registries

Sample documentation (demo only)
This is an incomplete, outdated docs snapshot shipped with the playground — screenshots were removed on purpose.
For the full, current manuals go to voodflow.com/docs.

Voodflow\Voodbuilder\Support\Editor\EditorBlockConfigRegistry

  • File: Support/Editor/EditorBlockConfigRegistry.php
  • Kind: class
  • Responsibility: Editor block defaults and event-scoping metadata registered by companions.

Methods

  • public function register(string $blockId, array $options = []): void
    • Performs register side effects.
  • public function registerRequiresEventId(string ...$blockIds): void
    • Performs registerRequiresEventId side effects.
  • public function registerPublishedEventIdResolver(callable $resolver): void
    • Performs registerPublishedEventIdResolver side effects.
  • public function requiresEventId(string $blockId): bool
    • Requires Event Id.
  • public function defaultsFor(string $blockId): array
    • Defaults For.
  • public function allDefaults(): array
    • All Defaults.
  • public function resolvePublishedEventId(): ?int
    • Resolve Published Event Id.

Voodflow\Voodbuilder\Support\Editor\EditorBlockDefinition

  • File: Support/Editor/EditorBlockDefinition.php
  • Kind: class
  • Responsibility: Editor Block Definition.

Methods

  • public function __construct( public readonly string $id, public readonly string $label, public readonly string $category, public readonly string $content, public readonly ?string $preview = null, public readonly array $attributes = [], )
    • Constructor.
  • public function toEditorArray(): array
    • Convert / serialize via toEditorArray.

Voodflow\Voodbuilder\Support\Editor\EditorBlockRegistry

  • File: Support/Editor/EditorBlockRegistry.php
  • Kind: class
  • Responsibility: Editor Block Registry.

Methods

  • public function register(EditorBlockDefinition $block): self
    • Register routes, blocks, channels, and bindings for this module.
  • public function allDefinitions(): array
    • Unfiltered definitions (for companion SOURCE merge, etc.).
  • public function toEditorBlocks(?bool $chromeLayoutEditor = null): array
    • Convert / serialize via toEditorBlocks.

Voodflow\Voodbuilder\Support\Editor\EditorCommunityBlockCatalog

  • File: Support/Editor/EditorCommunityBlockCatalog.php
  • Kind: class
  • Responsibility: Core Community Editor library allowlist.

Methods

  • public static function limitsLibrary(): bool
    • Core-owned IDs that leave Community sidebar for the Elements companion / Pro library.
  • public static function elementsLibraryActive(): bool
    • True when the Elements companion plugin is active on this host. Section templates then live in the remote SOURCE UI — not the local accordion.
  • public static function idAliases(string $blockId): array
    • BlockManager / adapter IDs may use a voodbuilder- prefix while catalog constants keep the logical id (e.g. site_nav_simple ↔ voodbuilder-site_nav_simple).
  • public static function expandIdsForBlockManager(array $ids): array
    • Expand Ids For Block Manager.
  • public static function idMatchesLookup(string $blockId, array $lookup): bool
    • Id Matches Lookup.
  • public static function sidebarAllowlist(?bool $chromeLayoutEditor = null): ?array
    • Sidebar Allowlist.
  • public static function filterEditorBlocks(array $blocks, ?bool $chromeLayoutEditor = null): array
    • Filter Editor Blocks.
  • public static function coreOwnedIds(): array
    • Core Owned Ids.
  • public static function isCompanionBlockId(string $id): bool
    • Boolean predicate isCompanionBlockId.
  • public static function requestIsChromeLayoutEditor(): bool
    • Request Is Chrome Layout Editor.

Voodflow\Voodbuilder\Support\Editor\EditorDynamicBlockRegistry

  • File: Support/Editor/EditorDynamicBlockRegistry.php
  • Kind: class
  • Responsibility: Editor Dynamic Block Registry.

Methods

  • public function register(string $category, string $blockClass): self
    • Register routes, blocks, channels, and bindings for this module.
  • public function blocks(): array
    • Blocks.
  • public function categoryFor(string $blockId): ?string
    • Category For.
  • public function resolve(string $blockId): ?string
    • Resolve a runtime value for the given field / context.
  • public function registerEditorBlocks(EditorBlockRegistry $registry, ?int $eventId = null): void
    • Performs registerEditorBlocks side effects.
  • protected static function excludedEditorBlocks(): array
    • Excluded Editor Blocks.
  • protected static function isExcludedFromEditor(string $blockId): bool
    • Boolean predicate isExcludedFromEditor.

Voodflow\Voodbuilder\Support\Editor\EditorServerBlockRegistry

  • File: Support/Editor/EditorServerBlockRegistry.php
  • Kind: class
  • Responsibility: Editor Server Block Registry.

Methods

  • public function register(string $category, string $blockClass): self
    • Register routes, blocks, channels, and bindings for this module.
  • public function blocks(): array
    • Blocks.
  • public function categoryFor(string $blockId): ?string
    • Category For.
  • public function resolve(string $blockId): ?string
    • Resolve a runtime value for the given field / context.
  • public function registerEditorBlocks(EditorBlockRegistry $registry, ?int $eventId = null): void
    • Performs registerEditorBlocks side effects.

Voodflow\Voodbuilder\Support\Editor\SectionBlocksCatalogBuilder

  • File: Support/Editor/SectionBlocksCatalogBuilder.php
  • Kind: class
  • Responsibility: Builds the Voodbuilder section block catalog from the upstream source JSON. Output blocks are renamed and use neutral placeholder copy (no third-party branding).

Methods

  • public static function sourcePath(): string
    • Source Path.
  • public static function sourceIsAvailable(): bool
    • Source Is Available.
  • public static function outputPath(): string
    • Output Path.
  • public function build(?string $sourcePath = null): array
    • Build.
  • public function write(?string $outputPath = null): int
    • Write.
  • protected function writeUtilitiesCatalogHtml(array $blocks): void
    • Tailwind @source catalog: migrated section → container markup (no double prefix).
  • protected function resolveType(array $definition): string
    • Resolve Type.
  • protected function resolveVariant(array $definition): string
    • Resolve Variant.
  • protected function sanitizeContent(string $html): string
    • Sanitize Content.
Demo resets in 00:29:39