Table of Contents

Class CloneSettings

Namespace
CMS.DataEngine
Assembly
CMS.DataEngine.dll

Class encapsulating parameters for object cloning (used in InsertAsClone settings)

public class CloneSettings
Inheritance
object
CloneSettings
Extension Methods

Properties

AfterCloneInsertCallback

Handles actions right after inserting the clone object.

public CloneSettings.OnCloneInsert AfterCloneInsertCallback { get; set; }

Property Value

CloneSettings.OnCloneInsert

AfterCloneStructureInsertCallback

Handles actions after processing main object and all the child, binging, ... etc. objects.

public CloneSettings.OnCloneInsert AfterCloneStructureInsertCallback { get; set; }

Property Value

CloneSettings.OnCloneInsert

BeforeCloneInsertCallback

Handles actions before inserting the clone. Use to further modify given object according to settings.

public CloneSettings.OnCloneInsert BeforeCloneInsertCallback { get; set; }

Property Value

CloneSettings.OnCloneInsert

CloneBase

Gets or sets the root object - the object the cloning procedure was called on (for example when cloning country with states, in the states the root object will be still the country).

public BaseInfo CloneBase { get; set; }

Property Value

BaseInfo

CodeName

New code name. If null, automatically generated unique code name is generated.

public string CodeName { get; set; }

Property Value

string

CustomParameters

Hashtable with custom parameters (for special cases such as BizForms, CustomTables, Webparts, etc.) where additional operations have to be done.

public Hashtable CustomParameters { get; set; }

Property Value

Hashtable

DisplayName

New display name. If null, automatically generated unique display name is generated.

public string DisplayName { get; set; }

Property Value

string

ExcludedBindingTypes

Gets or sets the list of binding object types which should not be cloned, if null than all child object types are cloned.

public List<string> ExcludedBindingTypes { get; set; }

Property Value

List<string>

ExcludedChildTypes

Gets or sets the list of child object types which should not be cloned, if null than all child object types are cloned.

public List<string> ExcludedChildTypes { get; set; }

Property Value

List<string>

ExcludedOtherBindingTypes

Gets or sets the list of other binding object types which should not be cloned, if null than all child object types are cloned.

public List<string> ExcludedOtherBindingTypes { get; set; }

Property Value

List<string>

IncludeBindings

If true, binding objects are included in the result.

public bool IncludeBindings { get; set; }

Property Value

bool

IncludeChildren

If true, child objects are included in the result.

public bool IncludeChildren { get; set; }

Property Value

bool

IncludeMetafiles

If true, metafiles of the object are included in the result as well.

public bool IncludeMetafiles { get; set; }

Property Value

bool

IncludeOtherBindings

If true, other binding objects are included in the result.

public bool IncludeOtherBindings { get; set; }

Property Value

bool

KeepFieldsTranslated

If true, cloned object will keep all the fields which use localization macros {\(res.string\)} without change. If false, cloned object will replace the localization with its translation in the default culture. This setting does not influence DisplayName - this will be always replaced by its translation.

public bool KeepFieldsTranslated { get; set; }

Property Value

bool

MaxRelativeLevel

Determines maximal level of the relationship (parent-child). -1 means all levels, 0 means no child objects, 1 means first level of children, etc.

public int MaxRelativeLevel { get; set; }

Property Value

int

Parameter

Custom parameter passed within the settings (for handlers usage, etc.).

public object Parameter { get; set; }

Property Value

object

ParentID

ID of the parent object to which the cloned object should be assigned.

public int ParentID { get; set; }

Property Value

int

Translations

Gets or sets the translation helper object (always at least empty instance, cannot return null) which provides translation Original object ID -> Cloned object ID.

public TranslationHelper Translations { get; set; }

Property Value

TranslationHelper