Skip to content

Restore entity_plus_export() and entity_plus_import() #121

@argiepiano

Description

@argiepiano

In D7, entity_export() called the controller's export method and gave you the ability to generate a JSON text that could be used to export a configuration entity.

While EntityPlusControllerExportable still has an export() and import() methods, and even though the function entity_plus_var_json_export() still exist in Entity Plus, the key functions entity_plus_export() and entity_plus_import() were removed, meaning that, for example, Entity UI can't invoke it to produce a JSON export of the entity.

Some modules like Rules have opted to define their own export functions, but for simpler custom entities it'd be great to restore this function to entity plus, AND to modify Entity UI to show the export option in the UI for configuration entities.

Incidentally, I believe this function was removed because Backdrop handles all configuration exports through the UI Configuration Manager, which works directly with config files. This is different in Entity Plus, as Entity Plus (and Rules etc) still uses DB storage for configuration entities.

It would be desirable to eventually move all configuration entities to config files rather than DB storage. But in the meantime, we should restore the original entity_export and entity_import functionality.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions