Part of the Entity ecosystem · 308 projects
This module enables attaching custom behaviors to any fieldable entity type, similar to paragraph behaviors. Developers can create behavior plugins that users can then enable for specific entity types and bundles, allowing for custom configurations and processing through hooks.
This project allows a user to attach behavior settings to any fieldable entity type.
The idea came from "Paragraph behaviors". And has been extended to all entity types.
It allows developers to create custom "behavior" plugins, which can be enabled for a content type.
The custom behavior plugin will then be available to enable on a specific entity type and bundle.
Once the entity type and bundle has an enabled behavior, a base field will be added.
This field will be avaible for configuration on your edit forms.
The behavior has a form, and will store the values of that form as a serialized blob in the database.
There are several hooks that can then be used to process the values entered by a user.
This way we can add classes and other stuff to the variables preprocess array.
See entity_type_behaviors.api.php for the hooks available.
There is an example module that you can look at on the basic functionality this module provides.
Related modules
There are functional entity_type behaviors you can use in the Entity Type Behaviors Pack module.
Ask your assistant about Entity Type Behaviors
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
1 tracked project depends on this one
More in the Entity ecosystem
Most installed first
Activity
Release Timeline
Releases
| Version | Type | Core | PHP | Release date | |
|---|---|---|---|---|---|
| 2.1.9 | Stable | 8–11 | Feb 24, 2026 | ||
| 2.1.8 | Stable | 8–11 | Nov 4, 2025 | ||
| 2.1.7 | Stable | 8–11 | Jul 1, 2025 | ||
| 2.1.6 | Stable | 8–11 | Apr 10, 2025 | ||
| 2.1.5 | Stable | 8–11 | Feb 19, 2025 | ||
| 2.1.x-dev | Dev | 8–11 | Feb 6, 2025 | ||
| 2.1.4 | Stable | 8–11 | Nov 14, 2024 | ||
| 2.1.3 | Stable | 8–10 | PHP 7.1 | Aug 20, 2024 | |
| 2.1.2 | Stable | 8–10 | PHP 7.1 | May 25, 2023 | |
| 2.1.1 | Stable | 8–10 | PHP 7.1 | Mar 8, 2023 |