Changes from Transform API v1 to v2

Last updated on
22 May 2025

Transform API v2 has fully rewritten the way entities are transformed. Just like view modes are handled by an EntityViewBuilder, transform modes are now transformed using a EntityTransformBuilder and entity types can define their own if they want.

This means that FieldTransforms are no longer used as the EntityTransformBuilder uses the FieldTransform plugins directly. Transform alters on fields should still work exactly like before, but transform alters on entities will now include field transforms directly instead of including FieldTransform objects.

Transform alters on entities now also include the entity as #{entity_type} just like entity theme templates. It's also still delivered in #entity, but this property is now deprecated.

Help improve this page

Page status: No known problems

You can: