Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.5][Feature] Added Clone operation #1708

Merged
merged 4 commits into from
Nov 16, 2018
Merged

Conversation

tabacitu
Copy link
Member

@tabacitu tabacitu commented Nov 16, 2018

Fixes #28

Adds Clone operation with two actions: clone() and bulkClone(). To enable it, one only needs to:

$this->crud->allowAccess('clone');

// and maybe, if you have bulk actions:
$this->crud->addButton('bottom', 'bulk_clone', 'view', 'crud::buttons.bulk_clone', 'beginning');

IMPORTANT: The clone operation does NOT duplicate related entries. So n-n relationships will be unaffected. However, this also means that n-n relationships are ignored. So when you clone an entry, the new entry:

  • will NOT have the same 1-1 relationships
  • will have the same 1-n relationships
  • will NOT have the same n-1 relationships
  • will NOT have the same n-n relationships

This might be somewhat counterintuitive for end users - though it should make perfect sense for us developers. Hence, the Clone operation is NOT enabled by default.

Todo:

  • add Clone operation to the documentation

@tabacitu tabacitu changed the title Added clone operation [3.5][Feature] Added clone operation Nov 16, 2018
@tabacitu tabacitu changed the title [3.5][Feature] Added clone operation [3.5][Feature] Added Clone operation Nov 16, 2018
@tabacitu tabacitu merged commit 22ee161 into release-3-5 Nov 16, 2018
@tabacitu tabacitu deleted the added-clone-operation branch November 16, 2018 08:17
@tabacitu
Copy link
Member Author

Merged into the 3.5 release - check it out here #1647

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant