public function Importer::__construct in Default Content for D8 8
Same name and namespace in other branches
- 2.0.x 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\ScannerInterface $scanner: The file scanner.
string $link_domain: Defines relation domain URI for entity links.
\Drupal\Core\Session\AccountSwitcherInterface $account_switcher: The account switcher.
File
- src/
Importer.php, line 104
Class
- Importer
- A service for handling import of default content.
Namespace
Drupal\default_contentCode
public function __construct(Serializer $serializer, EntityTypeManagerInterface $entity_type_manager, LinkManagerInterface $link_manager, EventDispatcherInterface $event_dispatcher, ScannerInterface $scanner, $link_domain, AccountSwitcherInterface $account_switcher) {
$this->serializer = $serializer;
$this->entityTypeManager = $entity_type_manager;
$this->linkManager = $link_manager;
$this->eventDispatcher = $event_dispatcher;
$this->scanner = $scanner;
$this->linkDomain = $link_domain;
$this->accountSwitcher = $account_switcher;
}