resolve_permalink()
resolve_permalink(string $guid) : string
Resolve any GUID into a fully qualified URL which can be relocated to. Operates in multiple phases:
- Check, whether the GUID is already known by NAP. In case we have the corresponding node/leaf loaded, use its linking information directly.
- Look if we have a topic, in that case, we get the corresponding NAP node and use it to resolve the permalink. If that object is not retrievable, the lookup fails.
- We check whether the object in question has a topic as one of its ancestors. If yes, that topic and its corresponding component is used to lookup the GUID, which might fail.
- As a last resort we have to iterate over all NAP topics to do the resolving.
Parameters
string | $guid | The GUID to resolve. |
Returns
string —The full HTTP relocation'able URL to the GUID.