Closed Raymond-Ly closed 3 years ago
Hi @ray-itech ,
the documentation is, unfortunately, a bit outdated at the moment. Refreshing that is on my TODO-List. For now, you can create a link resolver via:
$resolver = new \Contentful\Delivery\LinkResolver($client, $client->getResourcePool());
where $client
is your Delivery SDK client. You usually also don't need to parse rich text data when received via the SDK, it already does that for you.
If you're using the Management SDK, you can create a link resolver via:
$resolver = new \Contentful\Management\LinkResolver($client, new \Contentful\Management\ApiConfiguration(), new \Contentful\Management\RequestUriBuilder());
In the next update I'll include a method to directly create the resolver from the client. Hope this helps!
Hello @Sebb767 ,
Thanks for the response, this helps 😃
Hello,
I am confused with what the
LinkResolverInterface
argument should be. I am following the example in https://github.com/contentful/rich-text.php#parsingTrying to parse multiple
nodeType
:paragraph
which returns aContentful\RichText\Node\Document