Contracts
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\Contracts\DynamicPageProvider
- File:
Contracts/DynamicPageProvider.php - Kind:
interface - Responsibility: Companion contract for dynamic SitePage templates that claim public routes.
Methods
public function channelId(): string- Channel id aligned with contentChannel (e.g. exhibitors, events).
public function channelLabel(): string- Human-readable channel label for admin/editor UI.
public function claimableRoutes(): array- Claimable Laravel route names → admin labels (include path pattern hints).
public function entityKeys(): array- Entity bag keys companions pass to DynamicPageResolver (e.g. exhibitor, event).
public function normalizeRouteName(string $routeName): string- Map a matched route name to the logical claimable key used on SitePage.
public function previewUrl(?SitePage $page = null): ?string- Example public URL for Filament / editor preview.
public function previewEntities(?SitePage $page = null): array- Sample entities for editor preview when no request context is bound.
public function resolveRouteEntitiesFromSlugs(array $slugs): array- Resolve entities from public-route slugs (editor binding preview AJAX).
public function currentBindingSourceId(): string- Editor binding source id for this channel's ".current" context (e.g. vexhibitors.current).
public function editorRouteEntityPatterns(): array- Pathname regex patterns for editor binding preview when route_entities are absent.
Voodflow\Voodbuilder\Contracts\EditorBindingSource
- File:
Contracts/EditorBindingSource.php - Kind:
interface - Responsibility: Server-side data source for Editor field bindings (data-voodbuilder-bind).
Methods
public function id(): string- Stable binding source id (e.g. vtuts.latest).
public function label(): string- Human-readable label shown in the admin/editor UI.
public function package(): string- Package slug used to group sources in the editor UI (e.g. vtuts).
public function packageLabel(): string- Human-readable package group label in the bindings UI.
public function fields(): array- Field definitions available for binding (id, label, type metadata).
public function resolve(string $fieldId, BindingContext $context): ?string- Resolves a field id to a string value (or null) given BindingContext.
Voodflow\Voodbuilder\Contracts\EditorConfigurableBlock
- File:
Contracts/EditorConfigurableBlock.php - Kind:
interface - Extends:
EditorServerBlock - Responsibility: Optional extension for server-rendered Editor blocks with ad-hoc editor settings.
Methods
public static function normalizeConfig(array $config): array- Normalizes editor settings config before persist/render.
Voodflow\Voodbuilder\Contracts\EditorServerBlock
- File:
Contracts/EditorServerBlock.php - Kind:
interface - Responsibility: Server-rendered Editor block for third-party packages (no Filament RichEditor required).
Methods
public static function getId(): string- Stable block id used in editor markup / registry.
public static function getLabel(): string- Human-readable block label for the sidebar/library.
public static function defaultConfig(): array- Default config array when the block is inserted.
public static function toHtml(array $config, array $context): string- Renders published HTML from config + render context.
public static function toPreviewHtml(array $config, array $context): string- Renders editor/canvas preview HTML from config + context.
Voodflow\Voodbuilder\Contracts\MenuItemTypeHandler
- File:
Contracts/MenuItemTypeHandler.php - Kind:
interface - Responsibility: Contract for a custom navigation menu item type (form + URL resolution).
Methods
public function key(): string- Stable menu item type key registered in MenuItemTypeRegistry.
public function label(): string- Human-readable label shown in the admin/editor UI.
public function allowsRoot(): bool- Whether items of this type may be placed at menu root.
public function allowsChild(): bool- Whether items of this type may be nested under a parent.
public function formSchema(): array- Filament form components for type-specific fields.
public function resolveUrl(NavigationMenuItem $item): string- Resolve Url.
public function resolveChildren(NavigationMenuItem $item): Collection- Dynamic children rendered in place of (or instead of) persisted children.
public function isActive(NavigationMenuItem $item): bool- Whether the item should render as the active navigation state.
public function hasResolvableLink(NavigationMenuItem $item): bool- Whether the item resolves to a navigable URL (vs structural-only).
Voodflow\Voodbuilder\Contracts\PublicContentChannel
- File:
Contracts/PublicContentChannel.php - Kind:
interface - Responsibility: Hook for blog, news, docs, or other content systems that live outside Site Pages.
Methods
public function id(): string- Stable content channel id.
public function label(): string- Human-readable label shown in the admin/editor UI.
public function routePatterns(): array- Route name patterns used to keep navigation items highlighted (e.g. blog.*).
public function subTheme(): ?string- Optional sub-theme applied when the current route matches this channel.
public function search(string $term, int $limit = 20): Collection- Public search hits for this channel.
Voodflow\Voodbuilder\Contracts\RegistersAssets
- File:
Contracts/RegistersAssets.php - Kind:
interface - Responsibility: Module capability: register CSS/JS or Filament assets.
Methods
public function registerAssets(ModuleContext $context): void- Registers CSS/JS or Filament assets for the module.
Voodflow\Voodbuilder\Contracts\RegistersBlocks
- File:
Contracts/RegistersBlocks.php - Kind:
interface - Responsibility: Module capability: register editor sidebar / library blocks.
Methods
public function registerBlocks(EditorBlockRegistry $blocks, ModuleContext $context): void- Registers editor sidebar/library blocks on EditorBlockRegistry.
Voodflow\Voodbuilder\Contracts\RegistersConditions
- File:
Contracts/RegistersConditions.php - Kind:
interface - Responsibility: Module capability: register visibility condition evaluators.
Methods
public function conditionDefinitions(ModuleContext $context): array- Returns condition key → evaluator definitions for the editor conditions UI.
Voodflow\Voodbuilder\Contracts\RegistersEditorCommands
- File:
Contracts/RegistersEditorCommands.php - Kind:
interface - Responsibility: Module capability: contribute editor commands / actions.
Methods
public function editorCommands(ModuleContext $context): array- Returns editor command/action definitions contributed by the module.
Voodflow\Voodbuilder\Contracts\RegistersEditorPanels
- File:
Contracts/RegistersEditorPanels.php - Kind:
interface - Responsibility: Module capability: contribute visual editor inspector panels.
Methods
public function editorPanels(ModuleContext $context): array- Returns inspector panel definitions for the visual editor.
Voodflow\Voodbuilder\Contracts\RegistersFilamentResources
- File:
Contracts/RegistersFilamentResources.php - Kind:
interface - Responsibility: Module capability: register Filament admin resources.
Methods
public function registerFilamentResources(Panel $panel, ModuleContext $context): void- Registers Filament resources on the given Panel.
Voodflow\Voodbuilder\Contracts\RegistersRoutes
- File:
Contracts/RegistersRoutes.php - Kind:
interface - Responsibility: Module capability: register HTTP routes during module boot.
Methods
public function registerRoutes(Router $router, ModuleContext $context): void- Registers HTTP routes on the given Router during module boot.
Voodflow\Voodbuilder\Contracts\VoodBuilderModule
- File:
Contracts/VoodBuilderModule.php - Kind:
interface - Responsibility: Contract for a bootable VoodBuilder module (core internal or companion package).
Methods
public function id(): string- Stable module id.
public function name(): string- Human-readable module name.
public function version(): string- Module version string.
public function dependencies(): array- Other module ids that must be present/enabled.
public function capabilities(): array- Capability identifiers contributed or required by this module.
public function register(ModuleContext $context): void- Registers services/bindings before boot (container wiring).
public function boot(ModuleContext $context): void- Boots routes, Filament, blocks, and other runtime hooks.