You are here

public static function EntityViewsData::createInstance in Drupal 10

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

File

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

Class

EntityViewsData
Provides generic views integration for entities.

Namespace

Drupal\views

Code

public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) {
  return new static($entity_type, $container
    ->get('entity_type.manager')
    ->getStorage($entity_type
    ->id()), $container
    ->get('entity_type.manager'), $container
    ->get('module_handler'), $container
    ->get('string_translation'), $container
    ->get('entity_field.manager'));
}