Add service to convert bundles for use in code

Created on 8 February 2022, almost 3 years ago
Updated 10 December 2024, 9 days ago

Problem/Motivation

Currently the module is UI-focused and doesn't provide a service to convert bundles. As Drupal core still misses an API which allows such conversions, it would be very helpful for other modules to use the conversion handling of this module in code.

That means, for example a submodule of another module could act as converter module and define a dependency on convert_bundles. Then it could call the conversion in an update hook or at other points for entity bundles defined in code.

Steps to reproduce

Proposed resolution

Move the logic to convert entities into a service which is also usable for other modules and also use that class to call internally, simply providing the necessary parameters.

That means: The code calling the static functions from ConvertBundles class should be moved into that service.

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

🇩🇪Germany Anybody Porta Westfalica

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024