Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 298818

Introduce a "duplicate" entity operation

$
0
0

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.


Viewing all articles
Browse latest Browse all 298818

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>