Closed twhite94 closed 1 year ago
This is resolved with v4.0.0 :)
See https://github.com/contentful/rich-text.php/commit/e957a837e58d1b0502b6152005c24cf34b7152f0
Did this solution actually address what @twhite94 was suggesting? To me, it sounds like he wanted 'content' => $this->asset
. But maybe I misunderstood his request.
@benjamingeorge Assuming they have access to the full JSON, this is pretty much equivalent. That being said, I did not want to overwrite content, as this is usually used for the content and not for a reference.
The
jsonSerialize
method on the class Contentful\RichText\Node\EmbeddedAssetBlock looks like this:The content is empty, but it would be a lot more useful if
$this->asset
was returned instead. From that, I could access the file's url and other useful meta informationWould you like me to raise a pull request?