EntityViewsData::__construct

EntityViewsData::__construct(EntityTypeInterface $entity_type, SqlEntityStorageInterface $storage_controller, EntityManagerInterface $entity_manager, ModuleHandlerInterface $module_handler, TranslationInterface $translation_manager)

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\EntityManagerInterface $entity_manager: The entity manager.

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

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

File

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

Class

EntityViewsData
Provides generic views integration for entities.

Namespace

Drupal\views

Code

function __construct(EntityTypeInterface $entity_type, SqlEntityStorageInterface $storage_controller, EntityManagerInterface $entity_manager, ModuleHandlerInterface $module_handler, TranslationInterface $translation_manager) {
  $this->entityType = $entity_type;
  $this->entityManager = $entity_manager;
  $this->storage = $storage_controller;
  $this->moduleHandler = $module_handler;
  $this->setStringTranslation($translation_manager);
}
doc_Drupal
2016-10-29 09:09:13
Comments
Leave a Comment

Please login to continue.