Change record status: 
Project: 
Introduced in branch: 
8.0.x
Introduced in version: 
8.0
Description: 

Content entities do not implement TypedDataInterface and ComplexDataInterface any more. That means that quite some typed data related methods are removed from content entities, while getProperties() got replaced by getFields().

For any usage of a removed method, one now has to fetch the typed data adapter object for the entity and invoke the method on it like the following:

$definition = $entity->getDataDefinition();
// becomes
$definition = $entity->getTypedData()->getDataDefinition();

$entity->getTypedData() has been introduced to ease fetching the entity's typed data adapter object where needed.

Methods added to EntityInterface are:

  • getTypedData()

Methods of ContentEntityInterface being renamed are:

  • getProperties() -> getFields()

Methods of ContentEntityInterface being removed are:

  • getDataDefinition()
  • getValue()
  • setValue()
  • getString()
  • applyDefaultValue()
  • isEmpty()
  • getConstraints()
  • getName()
  • getRoot()
  • getPropertyPath()
  • getParent()
  • setContext()
Impacts: 
Module developers