DuplicatableModelTrait
trait DuplicatableModelTrait
Trait DuplicatableModelTrait
Methods
Duplicate Model and associated content This function will replicate the current model and its associated content:
- Referenced Documents will be referenced by passive or read reference
- Tags will be copied
No description
Helper Function to iterate over existing field values to ensure a valid name. a "_ID" with an increasing ID will be appended if the value already exists
Should reference items be duplicated (deep copy of dms objects) If false (default), references will be replicated as shallow read references to their original items
No description
Details
at line 33
Model
duplicate(array $overwriteProperties = [], DuplicatableInterface|null $targetModel = null)
Duplicate Model and associated content This function will replicate the current model and its associated content:
- Referenced Documents will be referenced by passive or read reference
- Tags will be copied
at line 190
array
getNonDuplicatableFields(array $ignoredFieldsByDefault = [])
No description
at line 112
mixed|string
getUniquePropertyValue($propertyId, $propertyValue)
Helper Function to iterate over existing field values to ensure a valid name. a "_ID" with an increasing ID will be appended if the value already exists
at line 199
protected bool
isReferenceDuplicationAllowed()
Should reference items be duplicated (deep copy of dms objects) If false (default), references will be replicated as shallow read references to their original items
at line 206
protected void
onDuplicateProperties(Model $duplicate)
No description
at line 213
protected void
onDuplicateSaved(Model $duplicate)
No description
at line 217
protected void
onReferencesDuplicated(array $referenceMap = [])
No description