public function get_consumers_mapped_to_tool($toolid) {
        global $DB;

        $consumers = [];
        $consumerrecords = $DB->get_records('enrol_lti_tool_consumer_map', ['toolid' => $toolid], '', 'consumerid');
        foreach ($consumerrecords as $record) {
            $consumers[] = ToolConsumer::fromRecordId($record->consumerid, $this);
        }
        return $consumers;
    }
public function get_consumers_mapped_to_tool($toolid) {
        global $DB;

        $consumers = [];
        $consumerrecords = $DB->get_records('enrol_lti_tool_consumer_map', ['toolid' => $toolid], '', 'consumerid');
        foreach ($consumerrecords as $record) {
            $consumers[] = ToolConsumer::fromRecordId($record->consumerid, $this);
        }
        return $consumers;
    }
public function get_consumers_mapped_to_tool ( $ toolid ) { global $ DB ; $ consumers = [ ] ; $ consumerrecords = $ DB -> get_records ( 'enrol_lti_tool_consumer_map' , [ 'toolid' => $ toolid ] , '' , 'consumerid' ) ; foreach ( $ consumerrecords as $ record ) { $ consumers [ ] = ToolConsumer :: fromRecordId ( $ record -> consumerid , $ this ) ; } return $ consumers ; }
Fetches the list of ToolConsumer objects that are linked to a tool.

@param int $toolid
@return ToolConsumer[]
Fetches the list of ToolConsumer objects that are linked to a tool .