cloner
Cloner let you clone any entity on Drupal site, and provide forms for this as well.
The obvious question that can appear, what's the difference between Cloner and Entity Clone?
Cloner inspired by Entity Clone, but uses a different approach to achieve the result. What's make it different:
- Targeted primarily for developers.
- Uses powerful Drupal 8 Plugin system.
- Does not add clone support for any entity type on site. You must write it manually.
- Does not add operations to entities unless you create ClonerForm plugin.
- Plugins for cloning entities and providing UI for them are separated and can be combined.
- You can create as many Cloner plugins, as you want, even for the same entity type and bundle combination.
- You write how an entity must be cloned and all behavior, there is no predefined cloners. But module take care to provide you original and cloned entities and care about saving them, you just move data as you need.
- You can call clone plugins directly in the code and use them in any place.
- This means Entity Clone is the more user-friendly module, which works with zero-configuration, but has drawbacks, if you have very complex entities and fields in it — like Drupal Commerce products with variations which should be cloned as well when the product is cloned.
Cloner, on the other hand, do nothing, but provides developers a convenient way to manage clone operation as it's needed for a specific project and context. You will get full control over cloning, and every complex entity type can be handled easily.
REQUIREMENTS
This module requires no modules outside the Drupal core.
INSTALLATION
- Install the Cloner module as you would normally install a contributed
Drupal module. Visit https://www.drupal.org/node/1897420 for further
information.
CONFIGURATION
There is no UI to configure the module out of the box. This module requires you to write a bit of code. For further information look at docs folder or cloner_examples module shipped with it.