Introduce hook for handling custom parent-child relationships

Created on 11 August 2023, over 1 year ago

Problem/Motivation

In our Drupal core, we leverage Layout Builder and Custom Blocks, but some of our custom blocks use an entity reference field for a backend content entity that is not directly accessible via the editing interface. These can have media and the like on them.

What we'd like is an ability to extend out the custom processing within `getSourceEntityLink` to handle these relationships, much like what is already done for block_content types, where it returns the results of a `getSourceEntityLink` on the parent.

Ideally behavior for this would be the module stores the relationship to the custom block, rather than the child, but that would require the `@EntityUsageTrack` system to be have some more awareness of entity types and special cases than it seems to be able to do, and having a hook be able to handle special cases would probably be simpler and maybe more flexible.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Add hook for altering/handling special cases in `getSourceEntityLink`

Data model changes

✨ Feature request
Status

Active

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States R_H-L

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024