EntityViewsDataInterface.php 689 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace Drupal\views;
  3. use Drupal\Core\Entity\EntityTypeInterface;
  4. /**
  5. * Provides an interface to integrate an entity type with views.
  6. */
  7. interface EntityViewsDataInterface {
  8. /**
  9. * Returns views data for the entity type.
  10. *
  11. * @return array
  12. * Views data in the format of hook_views_data().
  13. */
  14. public function getViewsData();
  15. /**
  16. * Gets the table of an entity type to be used as base table in views.
  17. *
  18. * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
  19. * The entity type.
  20. *
  21. * @return string
  22. * The name of the base table in views.
  23. */
  24. public function getViewsTableForEntityType(EntityTypeInterface $entity_type);
  25. }