You are here

function domain_entity_allowed_entity_types in Domain Access Entity 8

Same name and namespace in other branches
  1. 7 domain_entity.module \domain_entity_allowed_entity_types()

Returns the list of the domain_entity allowed entity types.

Return value

\Drupal\Core\Entity\EntityTypeInterface[] Keyed array of enabled entity types.

1 call to domain_entity_allowed_entity_types()
domain_entity_query_alter in ./domain_entity.module
Implements hook_query_alter().

File

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

Code

function domain_entity_allowed_entity_types() {
  $types =& drupal_static(__FUNCTION__);
  if (!isset($types)) {

    /** @var \Drupal\domain_entity\DomainEntityMapper $mapper */
    $mapper = \Drupal::service('domain_entity.mapper');
    $types = $mapper
      ->getEnabledEntityTypes();
  }
  return $types;
}