You are here

public function InPlaceUpdate::__construct in Automatic Updates 8

Constructs an InPlaceUpdate.

Parameters

\Psr\Log\LoggerInterface $logger: The logger.

\Drupal\Core\Archiver\ArchiverManager $archive_manager: The archive manager.

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

\Drupal\Core\File\FileSystemInterface $file_system: The filesystem service.

\GuzzleHttp\ClientInterface $http_client: The HTTP client service.

string $app_root: The app root.

File

src/Services/InPlaceUpdate.php, line 119

Class

InPlaceUpdate
Class to apply in-place updates.

Namespace

Drupal\automatic_updates\Services

Code

public function __construct(LoggerInterface $logger, ArchiverManager $archive_manager, ConfigFactoryInterface $config_factory, FileSystemInterface $file_system, ClientInterface $http_client, $app_root) {
  $this->logger = $logger;
  $this->archiveManager = $archive_manager;
  $this->configFactory = $config_factory;
  $this->fileSystem = $file_system;
  $this->httpClient = $http_client;
  $this->rootPath = (string) $app_root;
  $this->vendorPath = $this->rootPath . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR;
  $project_root = drupal_get_path('module', 'automatic_updates');
  require_once $project_root . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
}