public function get_resourcelink_from_consumer(ToolConsumer $consumer) {
        global $DB;

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

        return $resourcelink;
    }
public function get_resourcelink_from_consumer(ToolConsumer $consumer) {
        global $DB;

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

        return $resourcelink;
    }
public function get_resourcelink_from_consumer ( ToolConsumer $ consumer ) { global $ DB ; $ resourcelink = null ; if ( $ resourcelinkrecord = $ DB -> get_record ( $ this -> resourcelinktable , [ 'consumerid' => $ consumer -> getRecordId ( ) ] , 'ltiresourcelinkkey' ) ) { $ resourcelink = ResourceLink :: fromConsumer ( $ consumer , $ resourcelinkrecord -> ltiresourcelinkkey ) ; } return $ resourcelink ; }
Fetches a resource link record that is associated with a ToolConsumer.

@param ToolConsumer $consumer
@return ResourceLink
Fetches a resource link record that is associated with a ToolConsumer .