You are here

public function DomainNegotiator::getActiveDomain in Domain Access 8

Gets the active domain.

This method should be called by external classes using the negotiator service.

Parameters

bool $reset: Reset the internal cache of the active domain.

Return value

\Drupal\domain\DomainInterface The active domain object.

Overrides DomainNegotiatorInterface::getActiveDomain

File

domain/src/DomainNegotiator.php, line 155

Class

DomainNegotiator

Namespace

Drupal\domain

Code

public function getActiveDomain($reset = FALSE) {
  if ($reset) {
    $this
      ->negotiateActiveDomain();
  }
  return $this->domain;
}