You are here

public function UpdateManager::__construct in Lightning Core 8.2

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.3 src/UpdateManager.php \Drupal\lightning_core\UpdateManager::__construct()
  4. 8.4 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\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 72

Class

UpdateManager

Namespace

Drupal\lightning_core

Code

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