public function get_resourcelink_from_context(Context $context) {
        global $DB;

        $resourcelink = null;
        if ($resourcelinkrecord = $DB->get_record($this->resourcelinktable, ['contextid' => $context->getRecordId()],
            'ltiresourcelinkkey')) {
            $resourcelink = ResourceLink::fromContext($context, $resourcelinkrecord->ltiresourcelinkkey);
        }

        return $resourcelink;
    }
public function get_resourcelink_from_context(Context $context) {
        global $DB;

        $resourcelink = null;
        if ($resourcelinkrecord = $DB->get_record($this->resourcelinktable, ['contextid' => $context->getRecordId()],
            'ltiresourcelinkkey')) {
            $resourcelink = ResourceLink::fromContext($context, $resourcelinkrecord->ltiresourcelinkkey);
        }

        return $resourcelink;
    }
public function get_resourcelink_from_context ( Context $ context ) { global $ DB ; $ resourcelink = null ; if ( $ resourcelinkrecord = $ DB -> get_record ( $ this -> resourcelinktable , [ 'contextid' => $ context -> getRecordId ( ) ] , 'ltiresourcelinkkey' ) ) { $ resourcelink = ResourceLink :: fromContext ( $ context , $ resourcelinkrecord -> ltiresourcelinkkey ) ; } return $ resourcelink ; }
Fetches a resource link record that is associated with a Context object.

@param Context $context
@return ResourceLink
Fetches a resource link record that is associated with a Context object .