You are here

public function PluginManager::__construct in Backup and Migrate 5.0.x

Parameters

\Drupal\backup_migrate\Core\Service\ServiceManagerInterface $services:

\Drupal\backup_migrate\Core\Config\ConfigInterface $config:

Overrides ConfigurableTrait::__construct

File

src/Core/Plugin/PluginManager.php, line 39

Class

PluginManager
@package Drupal\backup_migrate\Core\Plugin

Namespace

Drupal\backup_migrate\Core\Plugin

Code

public function __construct(ServiceManagerInterface $services = NULL, ConfigInterface $config = NULL) {

  // Add the injected service locator for dependency injection into plugins.
  $this
    ->setServiceManager($services ? $services : new ServiceManager());

  // Set the configuration or a null object if no config was specified.
  $this
    ->setConfig($config ? $config : new Config());

  // Create an array to store the plugins themselves.
  $this->items = [];
}