public static function update_purpose(stdClass $record) {
        if (!isset($record->sensitivedatareasons)) {
            $record->sensitivedatareasons = '';
        }

        $purpose = new purpose($record->id);
        $purpose->from_record($record);

        $result = $purpose->update();

        return $purpose;
    }
public static function update_purpose(stdClass $record) {
        if (!isset($record->sensitivedatareasons)) {
            $record->sensitivedatareasons = '';
        }

        $purpose = new purpose($record->id);
        $purpose->from_record($record);

        $result = $purpose->update();

        return $purpose;
    }
public static function update_purpose ( stdClass $ record ) { if ( ! isset ( $ record -> sensitivedatareasons ) ) { $ record -> sensitivedatareasons = '' ; } $ purpose = new purpose ( $ record -> id ) ; $ purpose -> from_record ( $ record ) ; $ result = $ purpose -> update ( ) ; return $ purpose ; }
Updates an existing data purpose.

@param stdClass $record
@return \tool_dataprivacy\purpose.
Updates an existing data purpose .