You are here

public function InstallHelper::__construct in Drupal 8

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

Constructs a new InstallHelper object.

Parameters

\Drupal\path_alias\AliasManagerInterface $aliasManager: The path alias manager.

\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 113

Class

InstallHelper
Defines a helper class for importing default content.

Namespace

Drupal\demo_umami_content

Code

public function __construct(AliasManagerInterface $aliasManager, EntityTypeManagerInterface $entityTypeManager, ModuleHandlerInterface $moduleHandler, StateInterface $state, FileSystemInterface $fileSystem) {
  $this->aliasManager = $aliasManager;
  $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());
}