On this page
Configuration Entity
In modern Drupal (8 and above), configuration entities are used to store and share system settings. Configuration entities include user roles, site settings, image styles, and various third-party module settings. They're exportable and can be version-controlled.
Configuration entities are structured, typed objects that store system-level settings controlling site behavior. They can be exported and imported via Drupal's configuration management system. In practice, configuration entities are typically managed by developers and administrators.
Configuration entities represent items such as content types, views, user roles, image styles, block types, menus, and date formats. Unlike content entities, they are stored as configuration objects and designed to be exported and imported across environments, making them essential for keeping development, staging, and production synchronized.
Configuration entities support translation but do not use the Field API for user-configurable fields. Their structure is defined in code, which keeps them predictable and stable for configuration management workflows.
Configuration entities use the Entity API in order to keep configuration in the database.
Differences compared to Content Entity
- Integrates with CMI API for exportability.
- Doesn't have fields but uses properties instead.
- Schema file (Content Entity uses hook_schema())
Tutorials
- Drupal Example: Creating a configuration entity type in Drupal 8
- How to alter configuration entity data in Drupal
- Change Record: https://www.drupal.org/node/1818734
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion