Duplicate reference
Inherit Options
groups
type: string|string[]
Set groups where duplicate type is available.
Clone
Use native keyword clone
for duplication.
Type | clone |
Class | Enhavo\Bundle\ResourceBundle\Duplicate\Type\CloneDuplicateType |
Parent | Enhavo\Bundle\ResourceBundle\Duplicate\BaseActionType |
Inherit Options | groups |
Collection
Create a new collection or array and duplicate all items from old collection into the new collection. Use this type if you want to make a deep copy of a collection.
Type | collection |
Class | Enhavo\Bundle\ResourceBundle\Duplicate\Type\CollectionDuplicateType |
Parent | Enhavo\Bundle\ResourceBundle\Duplicate\BaseActionType |
Options | map_target, by_reference |
Inherit Options | groups |
by_reference
type: bool
default: false
When adding an item to the new collection, the add function of the parent will be used instead of the add function of the collection.
// by_reference is false
$newCollection->add($newItem);
$parent->setCollection($newCollection)
// by_reference is true
$parent->addItem($newItem)
map_target
type: bool
default: false
If you duplicate to a target collection and map_target
is true, then it will also call a duplicate to the target at the same index position.
Collection reference
Copy the reference of a collection. If the duplicate has a target, then the items of the original collection will be added or deleted to transform into the source collection.
Type | collection_reference |
Class | Enhavo\Bundle\ResourceBundle\Duplicate\Type\CollectionReferenceDuplicateType |
Parent | Enhavo\Bundle\ResourceBundle\Duplicate\BaseActionType |
Inherit Options | groups |
Datetime
Duplicate a DateTime
object.
Type | datetime |
Class | Enhavo\Bundle\ResourceBundle\Duplicate\Type\DateTimeDuplicateType |
Parent | Enhavo\Bundle\ResourceBundle\Duplicate\BaseActionType |
Inherit Options | groups |
File
Duplicate a media File
object or a collection of it.
Type | file |
Class | Enhavo\Bundle\MediaBundle\Duplicate\Type\FileDuplicateType |
Parent | Enhavo\Bundle\ResourceBundle\Duplicate\BaseActionType |
Inherit Options | groups |
Model
A new copy of an object.
Type | model |
Class | Enhavo\Bundle\ResourceBundle\Duplicate\Type\ModelDuplicateType |
Parent | Enhavo\Bundle\ResourceBundle\Duplicate\BaseActionType |
Inherit Options | groups |
Property
Duplicate a scalar or array.
Type | property |
Class | Enhavo\Bundle\ResourceBundle\Duplicate\Type\PropertyDuplicateType |
Parent | Enhavo\Bundle\ResourceBundle\Duplicate\BaseActionType |
Inherit Options | groups |
Reference
Use the same reference for an object.
Type | reference |
Class | Enhavo\Bundle\ResourceBundle\Duplicate\Type\ReferenceDuplicateType |
Parent | Enhavo\Bundle\ResourceBundle\Duplicate\BaseActionType |
Inherit Options | groups |
String
Copy a string.
Type | string |
Class | Enhavo\Bundle\ResourceBundle\Duplicate\Type\CloneDuplicateType |
Parent | Enhavo\Bundle\ResourceBundle\Duplicate\BaseActionType |
Options | prefixpostfixtranslation_domain |
Inherit Options | groups |
prefix
type: string
default: null
Add a string at the beginning of the duplicated string.
postfix
type: string
default: null
Add a string at the end of the duplicated string.
translation_domain
type: string
default: null
Translation domain for pre- and postfix.