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;
    }
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;
    }
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 ; }
Get a favourite object, based on a full record.
@param \stdClass $record the record we wish to hydrate.
@return favourite the favourite record.
Get a favourite object based on a full record .