You are here

public function Importer::__construct in Default Content for D8 2.0.x

Same name and namespace in other branches
  1. 8 src/Importer.php \Drupal\default_content\Importer::__construct()

Constructs the default content manager.

Parameters

\Symfony\Component\Serializer\Serializer $serializer: The serializer service.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager service.

\Drupal\hal\LinkManager\LinkManagerInterface $link_manager: The link manager service.

\Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher: The event dispatcher.

\Drupal\default_content\ContentFileStorageInterface $content_file_storage: The file scanner.

string $link_domain: Defines relation domain URI for entity links.

\Drupal\Core\Session\AccountSwitcherInterface $account_switcher: The account switcher.

\Drupal\default_content\Normalizer\ContentEntityNormalizerInterface $content_entity_normaler: The YAML normalizer.

File

src/Importer.php, line 117

Class

Importer
A service for handling import of default content.

Namespace

Drupal\default_content

Code

public function __construct(Serializer $serializer, EntityTypeManagerInterface $entity_type_manager, LinkManagerInterface $link_manager, EventDispatcherInterface $event_dispatcher, ContentFileStorageInterface $content_file_storage, $link_domain, AccountSwitcherInterface $account_switcher, ContentEntityNormalizerInterface $content_entity_normaler) {
  $this->serializer = $serializer;
  $this->entityTypeManager = $entity_type_manager;
  $this->linkManager = $link_manager;
  $this->eventDispatcher = $event_dispatcher;
  $this->contentFileStorage = $content_file_storage;
  $this->linkDomain = $link_domain;
  $this->accountSwitcher = $account_switcher;
  $this->contentEntityNormalizer = $content_entity_normaler;
}