You are here

function domain_entity_get_domain in Domain Access Entity 8

Returns the currently active domain.

Return value

\Drupal\domain\DomainInterface The currently active domain.

2 calls to domain_entity_get_domain()
domain_entity_entity_access in ./domain_entity.module
Implements hook_entity_access().
domain_entity_get_user_available_domains in ./domain_entity.module
Return a list of domain id's, accessible by the current user.

File

./domain_entity.module, line 112
Enables domain access for entities, and access query alter.

Code

function domain_entity_get_domain() {
  return \Drupal::service('domain.negotiator')
    ->getActiveDomain();
}