-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adjust the implementation to the new Twig Hooks version #16173
Changes from 1 commit
4e73cf3
e286f8c
9dd1ce3
019719e
e9758c0
5461ad1
f1551b1
991eb4b
5429d39
c25f053
62f5a33
930f387
5814a2f
a550b8d
57f2081
b2db5b8
fabd87f
eb8d217
367b17c
e913e9e
563b1db
5db9ca8
f25a8bd
9738134
5199283
e964f5c
bad4d63
a4ced77
1c75329
d627142
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,6 @@ twig_hooks: | |
props: | ||
form: '@=_context.form' | ||
resource: '@=_context.resource' | ||
parentMainHook: '@=_context.parent_main_hook' | ||
parentFallbackHook: '@=_context.parent_fallback_hook' | ||
isSimple: '@=_context.resource.isSimple()' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Having the property accessor take care of these expressions would be great, then we could go
or just
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll try to do it in Twig Hooks |
||
|
||
'sylius_admin.product.create.content.form': | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to add the way of passing the resource to components/templates to our convention, now it's either the resource name or simply
resource
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
by the way the we will stick out to the resource name rather than simply
resource
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With templates in mind we could just add both, that's basically in line with how those variables were in the templates before.
With components, it makes meagre sense since it needs to be added as a live prop (probably will be ignored otherwise, though I have not checked), in that case, I'd go w/ the resource name (stuff like
public ?Product $resource = null;
etc. imo looks weird).Either way we gotta talk it through and decide what's the better option.