protected function PluginManager::_preparePlugin in Backup and Migrate 8.4
Prepare the plugin for use. This is called when a plugin is added to the manager and it configures the plugin according to the config object injected into the manager. It also injects other dependencies as needed.
Parameters
\BackupMigrate\Core\Plugin\PluginInterface $plugin: The plugin to prepare for use.
string $id: The id of the plugin (to extract the correct settings).
1 call to PluginManager::_preparePlugin()
- PluginManager::add in lib/
backup_migrate_core/ src/ Plugin/ PluginManager.php - Add an item to the manager.
File
- lib/
backup_migrate_core/ src/ Plugin/ PluginManager.php, line 147
Class
- PluginManager
- Class PluginManager.
Namespace
BackupMigrate\Core\PluginCode
protected function _preparePlugin(PluginInterface $plugin, $id) {
// If this plugin can be configured, then pass in the configuration.
$this
->_configurePlugin($plugin, $id);
// Inject the available services.
$this
->services()
->addClient($plugin);
}