public static function getLtiLinkJSON($url, $title=false, $text=false,
        $icon=false, $fa_icon=false, $custom=false )
    {
        $return = '{
            "@context" : "http://purl.imsglobal.org/ctx/lti/v1/ContentItem",
                "@graph" : [
                { "@type" : "LtiLinkItem",
                    "@id" : ":item2",
                    "title" : "A cool tool hosted in the Tsugi environment.",
                    "mediaType" : "application/vnd.ims.lti.v1.ltilink",
                    "text" : "For more information on how to build and host powerful LTI-based Tools quickly, see www.tsugi.org",
                    "url" : "http://www.tsugi.org/",
                    "placementAdvice" : {
	                "presentationDocumentTarget" : "window",
	                "displayHeight" : 1024,
	                "displayWidth" : 800
                    },
                    "icon" : {
                        "@id" : "https://static.tsugi.org/img/default-icon.png",
                        "fa_icon" : "fa-magic",
                        "width" : 64,
                        "height" : 64
                    }
                }
            ]
        }';

        $json = json_decode($return);
        $json->{'@graph'}[0]->url = $url;
        if ( $title ) $json->{'@graph'}[0]->{'title'} = $title;
        if ( $text ) $json->{'@graph'}[0]->{'text'} = $text;
        if ( $icon ) $json->{'@graph'}[0]->{'icon'}->{'@id'} = $icon;
        if ( $fa_icon ) $json->{'@graph'}[0]->icon->fa_icon = $fa_icon;
        if ( $custom ) $json->{'@graph'}[0]->custom = $custom;
        return $json;
    }