-
Notifications
You must be signed in to change notification settings - Fork 18
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
add array key to prismic block #108
add array key to prismic block #108
Conversation
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.
Is the change in block/Slice.php really needed? b/c seems like we dont do anything with it in that function?
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.
Thank you!
Nice submission, added a suggestion but looks good to me
Block/Slices.php
Outdated
@@ -6,7 +6,7 @@ | |||
|
|||
class Slices extends Group | |||
{ | |||
public function fetchItem(\stdClass $slice): string | |||
public function fetchItem(\stdClass $slice, $key): string |
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.
:suggestion (non-blocking): you could add the setIterator($key)
here too on the block after setDocument
yes, thought I could imagine that need to set a default for the field for backwards compatibility.
effective function fetchItem(..., $key = null)
//...
null !== $key && $block->setIterator($key) |
Yes because it overwrites the Grouped and those need to be compatible... Can you review Wouter? Than we can merge this and tag it as a minor update 🍻 |
No description provided.