src/Twig/PbjxExtension.php
public function pbjUrl(Message $pbj, string $template): ?string
    {
        return UriTemplateService::expand("{$pbj::schema()->getQName()}.{$template}", $pbj->getUriTemplateVars());
    }
public function pbjUrl(Message $pbj, string $template): ?string
    {
        return UriTemplateService::expand("{$pbj::schema()->getQName()}.{$template}", $pbj->getUriTemplateVars());
    }
public function pbjUrl ( Message $ pbj , string $ template ) : ? string { return UriTemplateService :: expand ( "{$pbj::schema()->getQName()}.{$template}" , $ pbj -> getUriTemplateVars ( ) ) ; }
Returns a named URL to a pbj instance.

Example:
{{ pbj_url(pbj, 'canonical') }}

@param Message $pbj
@param string  $template

@return string
Returns a named URL to a pbj instance .