protected function get_favourite_from_record(\stdClass $record) : favourite {
        $favourite = new favourite(
            $record->component,
            $record->itemtype,
            $record->itemid,
            $record->contextid,
            $record->userid
        );
        $favourite->id = $record->id;
        $favourite->ordering = $record->ordering ?? null;
        $favourite->timecreated = $record->timecreated ?? null;
        $favourite->timemodified = $record->timemodified ?? null;

        return $favourite;
    }