By tim.plunkett on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.x
Issue links:
Description:
The PluginBag class has two additional abstract methods:
public function getConfiguration();
setConfiguration($configuration);
Both of the default plugin bags provide implementations.
These methods need to set and get the whole set of configuration for the plugin bag as a whole.
In order to add these methods, the DefaultPluginBag::setConfiguration() method is now DefaultPluginBag::setInstanceConfiguration(), since it is per instance.
Finally, the DefaultSinglePluginBag is used when there will only ever be one plugin. However, the constructor takes an array of plugin IDs. It now takes a single plugin ID as a string:
// Before
$plugin_bag = new DefaultSinglePluginBag($manager, array($instance_id), $configuration);
// After
$plugin_bag = new DefaultSinglePluginBag($manager, $instance_id, $configuration);
Impacts:
Module developers