You are here

public function DomainEntityMapper::getEnabledEntityTypes in Domain Access Entity 8

Returns entity types that have domain access field storage.

Return value

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

File

src/DomainEntityMapper.php, line 57

Class

DomainEntityMapper
Provides fields operations for domain entity module fields.

Namespace

Drupal\domain_entity

Code

public function getEnabledEntityTypes() {
  $result = [];
  $types = $this
    ->getEntityTypes();
  foreach ($types as $id => $type) {
    if ($this
      ->loadFieldStorage($id)) {
      $result[$id] = $type;
    }
  }
  return $result;
}