function DefaultHtmlRouteProvider::createInstance

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/Routing/DefaultHtmlRouteProvider.php \Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider::createInstance()
  2. 8.9.x core/lib/Drupal/Core/Entity/Routing/DefaultHtmlRouteProvider.php \Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider::createInstance()
  3. 10 core/lib/Drupal/Core/Entity/Routing/DefaultHtmlRouteProvider.php \Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider::createInstance()

Overrides EntityHandlerInterface::createInstance

1 method overrides DefaultHtmlRouteProvider::createInstance()
MediaRouteProvider::createInstance in core/modules/media/src/Routing/MediaRouteProvider.php
Instantiates a new instance of this entity handler.

File

core/lib/Drupal/Core/Entity/Routing/DefaultHtmlRouteProvider.php, line 63

Class

DefaultHtmlRouteProvider
Provides HTML routes for entities.

Namespace

Drupal\Core\Entity\Routing

Code

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

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