SilverStripe\Versioned\VersionedStateExtension::updateLink
Auto-append current stage if we're in draft, to avoid relying on session state for this, and the related potential of showing draft content without varying the URL itself.
Assumes that if the user has access to view the current record in draft stage, they can also view other draft records. Does not concern itself with verifying permissions for performance reasons. This should also pull through to form actions.
Signature
public function updateLink(string&
$link )
Parameters
$link
— string