Introduce a "duplicate" entity operation

Created on 20 February 2014, almost 11 years ago
Updated 8 January 2024, 11 months 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

Needs work

Version

11.0 ๐Ÿ”ฅ

Component
Entityย  โ†’

Last updated 38 minutes 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.
  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

  • Needs change record

    A change record needs to be drafted before an issue is committed. Note: Change records used to be called change notifications.

Missing content requested by

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

Comments & Activities

Production build 0.71.5 2024