Configuration export

Configuration entity types have a few extra options on their plugin definitions that relate to the exportability of the entities. By default, a number of configuration entity fields are persisted and exported. However, the config_export property needs be used to declare which other fields should be included in the export. For example, the NodeType configuration entity type defines the following:

 *   config_export = { *     "name", *     "type", *     "description", *     "help", *     "new_revision", *     "preview_mode", *     "display_submitted", *   }

Keep in mind that, without this definition, the configuration schema is used as a fallback to determine which fields to persist. If the configuration entity type doesn't have a schema (which it should ...

Get Drupal 8 Module Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.