public function getLtiLinkResource()
    {
        if (is_null($this->ltiLink)) {
            $service = $this->getServiceLocator()->get(LinkService::SERVICE_ID);
            $consumer = $this->getLaunchData()->getLtiConsumer();
            $linkId = $service->getLinkId($consumer->getUri(), $this->getLaunchData()->getResourceLinkID());
            $this->ltiLink = new core_kernel_classes_Resource($linkId);
        }
        return $this->ltiLink;
    }