You are here

public function InstallHelper::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 core/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php \Drupal\demo_umami_content\InstallHelper::__construct()

Constructs a new InstallHelper object.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: Entity type manager.

\Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler: Module handler.

\Drupal\Core\State\StateInterface $state: State service.

\Drupal\Core\File\FileSystemInterface $fileSystem: The file system.

File

core/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php, line 103

Class

InstallHelper
Defines a helper class for importing default content.

Namespace

Drupal\demo_umami_content

Code

public function __construct(EntityTypeManagerInterface $entityTypeManager, ModuleHandlerInterface $moduleHandler, StateInterface $state, FileSystemInterface $fileSystem) {
  $this->entityTypeManager = $entityTypeManager;
  $this->moduleHandler = $moduleHandler;
  $this->state = $state;
  $this->fileSystem = $fileSystem;
  $this->termIdMap = [];
  $this->mediaImageIdMap = [];
  $this->nodeIdMap = [];
  $this->enabledLanguages = array_keys(\Drupal::languageManager()
    ->getLanguages());
}