You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement #192 — prefix-stripping DX for CwaFixtureBuilder uiComponent
layout() and page() now accept a suffix only and prepend the correct
framework prefix automatically:
$cwa->layout('main', 'Primary') → stores 'CwaLayoutPrimary'
$cwa->page('home', 'Blog', ...) → stores 'CwaPageBlog'
ComponentBuilder gains uiComponent(string $suffix) which derives the full
alt-component name from the entity class:
$cwa->component($link)->uiComponent('YouTube')
→ stores 'CwaComponentNavigationLinkUiYouTube'
uiClassNames() on LayoutBuilder, PageBuilder, and ComponentBuilder is now
variadic: ->uiClassNames('bold', 'dark') instead of ->uiClassNames([...]).
GenerateFixturesCommand strips the CwaLayout/CwaPage prefix when emitting
fixture code so the generated output uses the new short-name API.
MakeCwaScaffold and skeleton template updated to use suffix-only names.
->getRoute(routeName): Route (look up a named route already created)
359
360
360
361
LayoutBuilder
361
362
->group(name, allow: [], ?Closure): GroupBuilder (returns the GroupBuilder; same name = same group)
362
-
->uiClassNames(array): self
363
+
->uiClassNames(string ...$classes): self
363
364
364
365
PageBuilder
365
366
->title(string): self
366
367
->metaDescription(string): self
367
-
->uiClassNames(array): self
368
+
->uiClassNames(string ...$classes): self
368
369
->group(name, ?Closure): GroupBuilder
369
370
->nested(Closure): void (Closure receives CwaFixtureBuilder with parent context)
370
371
->getRoute(): ?Route (route after builder flushes RouteGenerator)
@@ -374,6 +375,11 @@ PageDataBuilder
374
375
->onRoutesCreated(Closure): self (Closure receives array<PageBuilder> of direct child page builders; called after phaseThree so child route paths are available)
0 commit comments