You are here

public function UpdateManager::__construct in Lightning Core 8.4

Same name and namespace in other branches
  1. 8.5 src/UpdateManager.php \Drupal\lightning_core\UpdateManager::__construct()
  2. 8 src/UpdateManager.php \Drupal\lightning_core\UpdateManager::__construct()
  3. 8.2 src/UpdateManager.php \Drupal\lightning_core\UpdateManager::__construct()
  4. 8.3 src/UpdateManager.php \Drupal\lightning_core\UpdateManager::__construct()

UpdateCommand constructor.

Parameters

\Traversable $namespaces: The namespaces to scan for updates.

\Drupal\Core\DependencyInjection\ClassResolverInterface $class_resolver: The class resolver service.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory service.

\Drupal\Core\Extension\ModuleExtensionList $module_extension_list: The module extension list.

\Drupal\Component\Plugin\Discovery\DiscoveryInterface $discovery: (optional) The update discovery handler.

\phpDocumentor\Reflection\DocBlockFactoryInterface $doc_block_factory: (optional) The doc block factory.

File

src/UpdateManager.php, line 85

Class

UpdateManager
Discovers and manages optional configuration updates.

Namespace

Drupal\lightning_core

Code

public function __construct(\Traversable $namespaces, ClassResolverInterface $class_resolver, ConfigFactoryInterface $config_factory, ModuleExtensionList $module_extension_list, DiscoveryInterface $discovery = NULL, DocBlockFactoryInterface $doc_block_factory = NULL) {
  $this->classResolver = $class_resolver;
  $this->configFactory = $config_factory;
  $this->moduleExtensionList = $module_extension_list;
  $this->discovery = $discovery ?: new AnnotatedClassDiscovery('Update', $namespaces, Update::class);
  $this->docBlockFactory = $doc_block_factory ?: DocBlockFactory::createInstance();
}