Mercurial > hg > cmmr2012-drupal-site
diff core/modules/views/src/EntityViewsDataInterface.php @ 0:c75dbcec494b
Initial commit from drush-created site
author | Chris Cannam |
---|---|
date | Thu, 05 Jul 2018 14:24:15 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/modules/views/src/EntityViewsDataInterface.php Thu Jul 05 14:24:15 2018 +0000 @@ -0,0 +1,31 @@ +<?php + +namespace Drupal\views; + +use Drupal\Core\Entity\EntityTypeInterface; + +/** + * Provides an interface to integrate an entity type with views. + */ +interface EntityViewsDataInterface { + + /** + * Returns views data for the entity type. + * + * @return array + * Views data in the format of hook_views_data(). + */ + 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); + +}