Same name and namespace in other branches
  1. 8.9.x core/modules/views/src/EntityViewsData.php \Drupal\views\EntityViewsData::__construct()
  2. 9 core/modules/views/src/EntityViewsData.php \Drupal\views\EntityViewsData::__construct()

Constructs an EntityViewsData object.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type to provide views integration for.

\Drupal\Core\Entity\Sql\SqlEntityStorageInterface $storage_controller: The storage handler used for this entity type.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

\Drupal\Core\StringTranslation\TranslationInterface $translation_manager: The translation manager.

\Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager: The entity field manager.

File

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

Class

EntityViewsData
Provides generic views integration for entities.

Namespace

Drupal\views

Code

public function __construct(EntityTypeInterface $entity_type, SqlEntityStorageInterface $storage_controller, EntityTypeManagerInterface $entity_type_manager, ModuleHandlerInterface $module_handler, TranslationInterface $translation_manager, EntityFieldManagerInterface $entity_field_manager) {
  $this->entityType = $entity_type;
  $this->entityTypeManager = $entity_type_manager;
  $this->storage = $storage_controller;
  $this->moduleHandler = $module_handler;
  $this
    ->setStringTranslation($translation_manager);
  $this->entityFieldManager = $entity_field_manager;
}