You are here

public function EntityViewsData::getViewsTableForEntityType in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/views/src/EntityViewsData.php \Drupal\views\EntityViewsData::getViewsTableForEntityType()
  2. 10 core/modules/views/src/EntityViewsData.php \Drupal\views\EntityViewsData::getViewsTableForEntityType()

Gets the table of an entity type to be used as base table in views.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type.

Return value

string The name of the base table in views.

Overrides EntityViewsDataInterface::getViewsTableForEntityType

1 call to EntityViewsData::getViewsTableForEntityType()
EntityViewsData::processViewsDataForEntityReference in core/modules/views/src/EntityViewsData.php
Processes the views data for an entity reference field.

File

core/modules/views/src/EntityViewsData.php, line 666

Class

EntityViewsData
Provides generic views integration for entities.

Namespace

Drupal\views

Code

public function getViewsTableForEntityType(EntityTypeInterface $entity_type) {
  return $entity_type
    ->getDataTable() ?: $entity_type
    ->getBaseTable();
}