Moved image-related method into ImageHelpers
#707
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The short version:
A change in how Twill renders blocks necessitates us moving a method out of the our
App\Model\Vendor\Block
override model and into a helper.The long version:
When using Twill 2, we created
VendorServiceProvider
to swap our override Block model for the Twill Block model during dependency injection. (See https://laravel.com/docs/11.x/container#binding-interfaces-to-implementations for details on how this works.) However, due to this new line in Twill 3, nested blocks (including repeaters) are instantiated inline rather than during injection, so they will always be instances of Twill's Block model. In order to allow repeaters to access thegetImgixTileSource
function that was defined in our override model, I moved it into a helper.