Based on #47+48 of Wim Leers review of the media module #2831274-191: Bring Media entity module to core as Media module.

Problem/Motivation

The BuildForm() and SubmitForm() functions in Drupal\node\Form\DeleteMultiple are pretty complex. Other entities (for example the media entity) also need to implement similar functionality, and at the moment this could cause a fair amount of duplication.

Proposed resolution

Extract these functions to a trait or base class for other entity types to reuse.

Remaining tasks

  • Determine if we want to have a trait, base class or some other way to extract this.
  • Actually move the code.

User interface changes

API changes

Data model changes

Comments

seanB created an issue. See original summary.

wim leers’s picture

Issue tags: +D8Media

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

chr.fritsch’s picture

I would propose to move the DeleteAction, DeleteActionDeriver and DeleteMultiple classes from the contrib entity module into core to solve this.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

chr.fritsch’s picture

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

chr.fritsch’s picture

Status: Active » Closed (won't fix)

This issue could be closed. In #2670730: Provide a delete action for each content entity type we introduced Drupal\Core\Entity\Form\DeleteMultipleForm which is already used by media, node, and comment.