public function DomainSubscriber::__construct in Domain Access 8
Constructs a DomainSubscriber object.
Parameters
\Drupal\domain\DomainNegotiatorInterface $negotiator: The domain negotiator service.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
\Drupal\domain\Access\DomainAccessCheck $access_check: The access check interface.
\Drupal\Core\Session\AccountInterface $account: The current user account.
File
- domain/
src/ EventSubscriber/ DomainSubscriber.php, line 68
Class
- DomainSubscriber
- Sets the domain context for an http request.
Namespace
Drupal\domain\EventSubscriberCode
public function __construct(DomainNegotiatorInterface $negotiator, EntityTypeManagerInterface $entity_type_manager, DomainAccessCheck $access_check, AccountInterface $account) {
$this->domainNegotiator = $negotiator;
$this->entityTypeManager = $entity_type_manager;
$this->domainStorage = $this->entityTypeManager
->getStorage('domain');
$this->accessCheck = $access_check;
$this->account = $account;
}