Follow-up to #2569149: Use ConfigEntity for features bundles
Problem/Motivation
In #2569149: Use ConfigEntity for features bundles we introduced a new configuration entity for features bundles. While features bundles use a plugin collection, we minimized the refactoring and didn't implement EntityWithPluginCollectionInterface.
Proposed resolution
Since bundles have an associated plugin collection, FeaturesBundle could also implement EntityWithPluginCollectionInterface. At a minimum, we'll need to override EntityWithPluginCollectionInterface::getPluginCollections().
class FeaturesBundle extends ConfigEntityBase implements FeaturesBundleInterface, EntityWithPluginCollectionInterface {
}
A fairly close parallel is FilterFormat. Like FeaturesBundle, it includes associated plugins that can be enabled, ordered, and configured.
We might want to consider changing the current interface to something close to a filter edit form, e.g., admin/config/content/formats/manage/restricted_html, which includes configuring the config entity and associated plugins on the same form.
Use the plugin.manager.features_assignment_method service in a method called by FeaturesBundle::getPluginCollections().
Call ::get('configuration') to get configuration including code-provided plugin data.
Comments
Comment #2
nedjoComment #3
nedjoComment #4
mpotter commented