Introduce a "duplicate" entity operation

Created on 20 February 2014, almost 11 years ago
Updated 10 November 2023, about 1 year ago

Problem/Motivation

  1. \Drupal\Core\Entity\EntityInterface has a createDuplicate() method with which other code can create a duplicate of an entity.
  2. Two content entities in core (picture mappings and views) already define their own duplication/cloning operations, and there are numerous entities in contrib that already do the same or will do it in the future and would benefit from this being done by core in a generic way.

Proposed resolution

  • Extend \Drupal\Core\Entity\EntityAccessController with a check for the duplicate operation.
  • Add a link for the duplicate operation to \Drupal\Core\Entity\EntityListController which is only shown if the user has access to duplicate the entity the link is for.

Remaining tasks

None.

User interface changes

None.

API changes

No changes, but a duplicate entity operation will be introduced and the duplicate-form link template that is now used by picture mappings will become universal.

โœจ Feature request
Status

Closed: duplicate

Version

11.0 ๐Ÿ”ฅ

Component
Entityย  โ†’

Last updated about 2 hours ago

  • Maintained by
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom @catch
  • ๐Ÿ‡จ๐Ÿ‡ญSwitzerland @berdir
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany @hchonov
Created by

๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom Xano Southampton

Live updates comments and jobs are added and updated live.

Missing content requested by

๐Ÿ‡ฆ๐Ÿ‡บAustralia dpi
about 1 year ago
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024