interface EntityViewsDataInterface

Same name in other branches
  1. 9 core/modules/views/src/EntityViewsDataInterface.php \Drupal\views\EntityViewsDataInterface
  2. 8.9.x core/modules/views/src/EntityViewsDataInterface.php \Drupal\views\EntityViewsDataInterface
  3. 10 core/modules/views/src/EntityViewsDataInterface.php \Drupal\views\EntityViewsDataInterface

Provides an interface to integrate an entity type with views.

Hierarchy

Expanded class hierarchy of EntityViewsDataInterface

All classes that implement EntityViewsDataInterface

1 file declares its use of EntityViewsDataInterface
ViewsConfigEntityTestViewsData.php in core/modules/views/tests/modules/views_config_entity_test/src/ViewsConfigEntityTestViewsData.php

File

core/modules/views/src/EntityViewsDataInterface.php, line 10

Namespace

Drupal\views
View source
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);

}

Members

Title Sort descending Modifiers Object type Summary Overrides
EntityViewsDataInterface::getViewsData public function Returns views data for the entity type. 2
EntityViewsDataInterface::getViewsTableForEntityType public function Gets the table of an entity type to be used as base table in views. 2

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.