You are here

public static function ConvertBundles::getBaseTableNames in Convert Bundles 8

1 call to ConvertBundles::getBaseTableNames()
ConvertBundlesForm::convertBundles in src/Form/ConvertBundlesForm.php

File

src/ConvertBundles.php, line 108

Class

ConvertBundles
ConvertBundles.

Namespace

Drupal\convert_bundles

Code

public static function getBaseTableNames($entity_type) {
  $storage = \Drupal::service('entity_type.manager')
    ->getStorage($entity_type);

  // Get the names of the base tables.
  $base_table_names = [];
  $base_table_names[] = $storage
    ->getBaseTable();
  if (!empty($storage
    ->getDataTable())) {
    $base_table_names[] = $storage
      ->getDataTable();
  }
  return $base_table_names;
}