Quantcast
Viewing all articles
Browse latest Browse all 295062

Add owner to the BlockContent entity type

Problem/Motivation

Block content entities do not have an owner (uid) field, they do have a revision_user field. All other core entity types have owner fields, block content should have one too!

Proposed resolution

  1. Add owner entity key to BlockContent entity type
  2. Add EntityOwnerInterface to BlockContentInterface and add EntityOwnerTrait to BlockContent
  3. Add ownerBaseFieldDefinitions to baseFieldDefinitions
  4. Add an upgrade path that sets the author of existing Block Content entities to the value of the first revision's revision_user
  5. Add an upgrade path to install the new owner field
  6. Implement/copy JS to show authoring information on the edit form like nodeDetailsSummaries and mediaFormSummaries behaviours - Split to #3403252: [PP1] Implement authoring information form element and summary for Block Content
  7. Write tests

Canonical MR is https://git.drupalcode.org/project/drupal/-/merge_requests/5500

Disregard all patch files.

Remaining tasks

Rebase MR on to 11.x
Fix upgrade path to set author properly
Add upgrade hook to install field
Add tests.
Review
Commit

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 295062

Trending Articles



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