You are here

protected function ViewsSchemaProvider::getDataTableMap in GraphQL 8

Same name and namespace in other branches
  1. 8.2 src/SchemaProvider/ViewsSchemaProvider.php \Drupal\graphql\SchemaProvider\ViewsSchemaProvider::getDataTableMap()

Return value

array

1 call to ViewsSchemaProvider::getDataTableMap()
ViewsSchemaProvider::getQuerySchema in src/SchemaProvider/ViewsSchemaProvider.php

File

src/SchemaProvider/ViewsSchemaProvider.php, line 72

Class

ViewsSchemaProvider
Generates a GraphQL Schema for views.

Namespace

Drupal\graphql\SchemaProvider

Code

protected function getDataTableMap() {
  $map = [];
  foreach ($this->entityManager
    ->getDefinitions() as $entityTypeId => $entityType) {
    if ($dataTable = $entityType
      ->getDataTable()) {
      $map[$dataTable] = $entityType
        ->id();
    }
  }
  return $map;
}