- Issue created by @dpi
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
I wonder if we could add a property attribute e.g #[Theme\Variable] and put that on constructor Params and have the theme hook variables inferred
Between the constructor, a factory method, the theme definition and the build method, there's a lot of boilerplate around the variable names
I also wonder if the method that does the build could auto fill # keys from properties with attributes so if you don't need any logic these get passed through to the render array automatically
I can spin up a new issue (or two) for both those ideas if this isn't the best place for it
- π¦πΊAustralia dpi Perth, Australia
I wonder if we could add a property attribute e.g #[Theme\Variable] and put that on constructor Params and have the theme hook variables inferred
This sounds like an interesting idea.
New issue, though. This one isnβt quite it.
- π¦πΊAustralia dpi Perth, Australia
This bug was fixed with a workaround as a part of π Implement Slots Active . Definitions are now serialised to a string, so objects no longer enter Drupals' container.
A new factory unserialises definitions on request in a factory.
- Merge request !11Issue #3425951 by dpi: Test coverage for objects in theme definitions β (Merged) created by dpi
- π¦πΊAustralia dpi Perth, Australia
Test coverage added in !11 β https://git.drupalcode.org/project/pinto/-/merge_requests/11
Automatically closed - issue fixed for 2 weeks with no activity.