ConvertContentType (open)
Convert contenttypes
Syntax
LOADLIB "mod::system/lib/migrations.whlib";
RECORD ARRAY FUNCTION ConvertContentType(STRING srctype, RECORD options)Parameters
STRING srctypeSource instance type
RECORD optionsOptions
STRING desttypeDestination type. If empty, assumed to equal the source type
FUNCTION PTR mapcallbackCallback to invoke on instance records for conversion. If it returns a DEFAULT RECORD, this instance will not be converted
BOOLEAN sourceorphansOpen source type and data as an oprhan (access deleted types and members)
Return value
RECORD ARRAYA list of fsobjects converted, suitable for passing into RepublishWHFSObjectReferences
INTEGER ARRAY fsobjectfsobject ID containing the instance
Description
Rewrite content types (and widgets) to the specified type. Instances (eg widgets in RTDs) of the source type will be changed to the destination type