function CommentViewBuilder::createInstance

Same name and namespace in other branches
  1. 9 core/modules/comment/src/CommentViewBuilder.php \Drupal\comment\CommentViewBuilder::createInstance()
  2. 8.9.x core/modules/comment/src/CommentViewBuilder.php \Drupal\comment\CommentViewBuilder::createInstance()
  3. 10 core/modules/comment/src/CommentViewBuilder.php \Drupal\comment\CommentViewBuilder::createInstance()

Overrides EntityViewBuilder::createInstance

File

core/modules/comment/src/CommentViewBuilder.php, line 63

Class

CommentViewBuilder
View builder handler for comments.

Namespace

Drupal\comment

Code

public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) {
    return new static($entity_type, $container->get('entity.repository'), $container->get('language_manager'), $container->get('current_user'), $container->get('theme.registry'), $container->get('entity_display.repository'), $container->get('entity_type.manager'));
}

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