Models
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\Models\ChromeLayout
- File:
Models/ChromeLayout.php - Kind:
class - Extends:
Model - Responsibility: Chrome Layout.
Methods
protected function casts(): array- Attribute cast map for the model.
public function resolvedContentWidth(): array- Resolved Content Width.
public function builderPayload(): array- Builder Payload.
public function assignedChannelIds(): array- Assigned Channel Ids.
public function appliesToChannel(?string $channelId): bool- Applies To Channel.
public function isDraftShell(): bool- Chrome layouts saved from Theme Studio before any header/footer blocks are added contain only editor drop zones — treat them as unpublished and fall back to default.
public static function ensureSingleDefault(?self $layout): void- Ensure at most one layout is marked as the site-wide default.
Voodflow\Voodbuilder\Models\ModelIntegration
- File:
Models/ModelIntegration.php - Kind:
class - Extends:
Model - Responsibility: Model Integration.
Methods
protected static function booted(): void- Model boot hooks (observers/events).
public function refreshRegistrations(): void- Performs
refreshRegistrationsside effects.
- Performs
public function registerOnBoot(): void- Performs
registerOnBootside effects.
- Performs
public function unregister(): void- Performs
unregisterside effects.
- Performs
public function getAlias(): string- Get Alias.
public function getNormalizedFields(): array- Get Normalized Fields.
protected function normalizeRelationFields(array $fields): array- Normalize Relation Fields.
Voodflow\Voodbuilder\Models\NavigationMenu
- File:
Models/NavigationMenu.php - Kind:
class - Extends:
Model - Responsibility: Navigation Menu.
Methods
protected function casts(): array- Attribute cast map for the model.
protected static function booted(): void- Model boot hooks (observers/events).
public function translations(): HasMany- Eloquent relation
translations.
- Eloquent relation
public function translationFor(string $locale): ?self- Translation For.
public function translationLocaleCodes(): array- Translation Locale Codes.
public function otherTranslationLocaleCodes(): array- Other Translation Locale Codes.
public function items(): HasMany- Eloquent relation
items.
- Eloquent relation
public function rootItems(): HasMany- Eloquent relation
rootItems.
- Eloquent relation
public static function forPlacement(string $slug, ?string $locale = null): ?self- For Placement.
Voodflow\Voodbuilder\Models\NavigationMenuItem
- File:
Models/NavigationMenuItem.php - Kind:
class - Extends:
Model - Responsibility: Navigation Menu Item.
Methods
protected function casts(): array- Attribute cast map for the model.
public function resolvedDescription(): ?string- Resolved Description.
public function resolvedIcon(): ?string- Resolved Icon.
public function hasRichPresentation(): bool- Boolean predicate
hasRichPresentation.
- Boolean predicate
public function resolvedDropdownLayout(): MenuDropdownLayout- Desktop dropdown layout for this parent (list vs mega grid).
public function usesMegaDropdown(): bool- Uses Mega Dropdown.
protected static function booted(): void- Model boot hooks (observers/events).
public static function assertValidNestingDepth(NavigationMenuItem $item): void- Performs
assertValidNestingDepthside effects.
- Performs
public function menu(): BelongsTo- Menu.
public function parent(): BelongsTo- Eloquent relation
parent.
- Eloquent relation
public function children(): HasMany- Eloquent relation
children.
- Eloquent relation
public function hasChildren(): bool- Boolean predicate
hasChildren.
- Boolean predicate
public function navigationChildren(): Collection- Children used for front-end rendering (persisted + registered type children).
public function typeKey(): string- Type Key.
public function registeredTypeHandler(): ?MenuItemTypeHandler- Registered Type Handler.
public function resolveUrl(): string- Resolve Url.
public function hasResolvableLink(): bool- Boolean predicate
hasResolvableLink.
- Boolean predicate
protected function resolveRouteUrl(): string- Resolve Route Url.
protected function routeParameters(): array- Route Parameters.
public function isExternal(): bool- Boolean predicate
isExternal.
- Boolean predicate
public function isActive(): bool- Boolean predicate
isActive.
- Boolean predicate
public function isSelfActive(): bool- Boolean predicate
isSelfActive.
- Boolean predicate
protected function isActivePageLink(): bool- Boolean predicate
isActivePageLink.
- Boolean predicate
protected function resolvePageUrl(): string- Resolve Page Url.
protected function resolveMailUrl(): string- Resolve Mail Url.
Voodflow\Voodbuilder\Models\PageTemplate
- File:
Models/PageTemplate.php - Kind:
class - Extends:
Model - Responsibility: Page Template.
Methods
public function builderPayload(): array- Builder Payload.
Voodflow\Voodbuilder\Models\SitePage
- File:
Models/SitePage.php - Kind:
class - Extends:
Model - Implements:
HasRichContent - Responsibility: Site Page.
Methods
protected function casts(): array- Attribute cast map for the model.
public function dynamicRouteNames(): array- Logical claimable route names owned by this dynamic template.
protected function setUpRichContent(): void- Performs
setUpRichContentside effects.
- Performs
protected static function booted(): void- Model boot hooks (observers/events).
public function chromeLayout(): BelongsTo- Chrome Layout.
public function translations(): HasMany- Eloquent relation
translations.
- Eloquent relation
public function credentials(): HasMany- Eloquent relation
credentials.
- Eloquent relation
public function translationFor(string $locale): ?self- Translation For.
public function translationLocaleCodes(): array- Translation Locale Codes.
public function otherTranslationLocaleCodes(): array- Other Translation Locale Codes.
public static function currentLocale(): string- Current Locale.
public function getSlugOptions(): SlugOptions- Get Slug Options.
public function getUrl(): string- Get Url.
public function usesEditorBuilder(): bool- Uses Editor Builder.
public function renderedContent(): string- Rendered Content.
public function renderedStyles(): ?string- Rendered Styles.
public function pageCssStylesheetUrl(): ?string- Cache-busted public URL for a page CSS artifact, when the sheet is stored on disk.
public function renderedScripts(): ?string- Rendered Scripts.
public function usesAutomaticLayout(): bool- Uses Automatic Layout.
public function usesFullWidthLayout(): bool- Uses Full Width Layout.
public function isLandingLayout(): bool- Boolean predicate
isLandingLayout.
- Boolean predicate
public function shouldHideSiteFooter(): bool- Should Hide Site Footer.
public function shouldHideSiteNav(): bool- Should Hide Site Nav.
public function usesLandingCanvas(): bool- Uses Landing Canvas.
public function resolvedSubTheme(): string- Resolved Sub Theme.
public function isSectionHome(): bool- Boolean predicate
isSectionHome.
- Boolean predicate
public function isSectionArticle(): bool- Boolean predicate
isSectionArticle.
- Boolean predicate
public function displayExcerpt(): string- Display Excerpt.
public static function sectionArticles(string $section, ?self $exclude = null): Collection- Section Articles.
public static function sectionHomePage(string $section): ?self- Section Home Page.
public function layoutView(): string- Layout View.
public function contentSection(): string- Content Section.
protected function resolvedLayoutKey(): string- Resolved Layout Key.
protected function storedLayoutKey(): string- Stored Layout Key.
protected function layoutKeyAlternates(string $layoutKey): array- Layout Key Alternates.
protected function fallbackLayoutView(string $layoutKey): string- Fallback Layout View.
public function getDynamicSEOData(): SEOData- Get Dynamic S E O Data.
protected function seoTitle(?Model $seo): string- Seo Title.
protected function seoDescription(?Model $seo): ?string- Seo Description.
protected function seoRobots(?Model $seo): ?string- Seo Robots.
protected function seoSchema(): SchemaCollection- Seo Schema.
protected function seoAlternates(): ?array- Seo Alternates.
protected function excerptFromContent(): string- Excerpt From Content.
protected function published(Builder $query): Builder- Published.
public static function homePage(?string $locale = null): ?self- Home Page.
Voodflow\Voodbuilder\Models\SitePageCredential
- File:
Models/SitePageCredential.php - Kind:
class - Extends:
Model - Responsibility: Email/password (or password-only) credential for a password-protected site page.
Methods
public function page(): BelongsTo- Eloquent relation
page.
- Eloquent relation
Voodflow\Voodbuilder\Models\SitePageRevision
- File:
Models/SitePageRevision.php - Kind:
class - Extends:
Model - Responsibility: Site Page Revision.
Methods
protected function casts(): array- Attribute cast map for the model.
public function scopeManual(Builder $query): void- Performs
scopeManualside effects.
- Performs
public function scopeAutosaves(Builder $query): void- Performs
scopeAutosavesside effects.
- Performs
public function sitePage(): BelongsTo- Site Page.
public function creator(): BelongsTo- Creator.
Voodflow\Voodbuilder\Models\VoodbuilderSettings
- File:
Models/VoodbuilderSettings.php - Kind:
class - Extends:
Model - Responsibility: Voodbuilder Settings.
Methods
protected function casts(): array- Attribute cast map for the model.
public static function defaults(): array- Defaults.
public static function docss(): array- Backwards-compatible alias used by tests to build initial
datapayloads.
- Backwards-compatible alias used by tests to build initial
public static function data(): array- Data.
public static function canonicalRecord(): ?self- Boolean predicate
canonicalRecord.
- Boolean predicate
protected static function normalizeData(array $data): array- Normalize Data.
protected static function clampSearchInt(mixed $value, int $min, int $max, int $default): int- Clamp Search Int.
protected static function migrateLegacyThemeColorKeys(array $colors): array- Migrate Legacy Theme Color Keys.
public static function get(string $key, mixed $default = null): mixed- Get.
public static function siteTitle(): string- Site Title.
public static function brandName(): string- Brand Name.
public static function primaryLocale(): string- Primary Locale.
public static function defaultUiLocale(): string- Default Ui Locale.
public static function logoUrl(): ?string- Logo Url.
public static function faviconUrl(): string- Uploaded favicon (light / default), or the Voodflow brand mark when none is configured.
public static function faviconLightUrl(): ?string- Light-scheme favicon upload only (null when unset — no brand-mark fallback).
public static function faviconDarkUrl(): ?string- Dark-scheme favicon upload only (null when unset).
public static function logoMobileUrl(): ?string- Logo Mobile Url.
public static function customLogoUrl(): ?string- User-uploaded (or config) desktop logo only — null when using the package default mark.
public static function hasCustomLogo(): bool- True when a user-uploaded (or config) desktop logo is set — not the package default mark.
public static function assetUrl(string $key, mixed $fallback = null): ?string- Asset Url.
public static function saveData(array $data): void- Performs
saveDataside effects.
- Performs
protected static function mergedPayloadFor(self $canonical): array- Merged Payload For.
protected static function deleteOrphanRecords(self $canonical): void- Performs
deleteOrphanRecordsside effects.
- Performs
public static function normalizeLogoValue(mixed $logo): ?string- Normalize Logo Value.
public static function normalizeUploadValue(mixed $value): ?string- Normalize Upload Value.
public static function resolvePublicAsset(mixed $value): ?string- Resolve Public Asset.
public static function clearCache(): void- Performs
clearCacheside effects.
- Performs