Commit 68fdeaf7 authored by xjm's avatar xjm

Issue #2491687 by joachim: Make EntityViewsData::getViewsTableForEntityType()...

Issue #2491687 by joachim: Make EntityViewsData::getViewsTableForEntityType() public rather than protected
parent d81c9865
......@@ -550,15 +550,9 @@ protected function processViewsDataForUuid($table, FieldDefinitionInterface $fie
}
/**
* Gets the table of an entity type to be used as base table in views.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type.
*
* @return string
* The name of the base table in views.
* {@inheritdoc}
*/
protected function getViewsTableForEntityType(EntityTypeInterface $entity_type) {
public function getViewsTableForEntityType(EntityTypeInterface $entity_type) {
return $entity_type->getDataTable() ?: $entity_type->getBaseTable();
}
......
......@@ -7,6 +7,8 @@
namespace Drupal\views;
use Drupal\Core\Entity\EntityTypeInterface;
/**
* Provides an interface to integrate an entity type with views.
*/
......@@ -20,4 +22,15 @@ interface EntityViewsDataInterface {
*/
public function getViewsData();
/**
* Gets the table of an entity type to be used as base table in views.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type.
*
* @return string
* The name of the base table in views.
*/
public function getViewsTableForEntityType(EntityTypeInterface $entity_type);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment