Entity field value inherited from another entity programmatically in Drupal 8?

by tseven   Last Updated January 05, 2018 23:07 PM

I'd like to setup two content types in a parent -> child relationship.

Node A of content type "parent" has custom field:

  1. (text) Description

Node B of content type "child" has custom field:

  1. (text) Description dynamically inherited (referenced) from parent node.

When the description of Node A changes, Node B automatically reflects this change.

I'd like to achieve this entirely on the backend, no UI or forms needed.

I will be creating the child nodes programmatically.

Topics I've found have danced around what I'm trying to do but lack the details I need to execute it. inheriting fields from a base content type

I have experience with Drupal 6 & 7 but am new to Drupal 8's entity apis.

A detailed explanation or example of how to achieve this would be greatly appreciated.


Tags : 8 nodes entities

Related Questions

Is it possible to disable the Node module?

Updated April 19, 2015 20:03 PM

Changing a node's content type

Updated May 01, 2016 08:03 AM

How do I fix this issue with space

Updated March 20, 2017 22:07 PM