On this page
Advanced usage
There are several ways to extend Component Schema to cover advanced use cases.
Custom data types
Like Drupal core's configuration schema API, Component Schema supports providing custom data types through a schema file. Custom types can be freestanding or can extend existing types. See the documentation on types supported in the Drupal core configuration schema API for relevant documentation.
To provide a custom type, add it to a module in the location component/schema/modulename.schema.yml
. See the file component/schema/component_schema.types.yml
for an example.
Altering components
Components are provided in a storage that can be altered in an event subscriber. Component Schema provides a ComponentSchemaStorageEvents::TRANSFORM_COLLECT
event parallel to Drupal core's ConfigEvents::STORAGE_TRANSFORM_IMPORT
; see also StorageTransformEvent
.
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