public function EntityTypeManager::getRouteProviders
public EntityTypeManager::getRouteProviders($entity_type)
Gets all route provider instances.
Parameters
string $entity_type: The entity type for this route providers.
Return value
\Drupal\Core\Entity\Routing\EntityRouteProviderInterface[]
Overrides EntityTypeManagerInterface::getRouteProviders
File
- core/lib/Drupal/Core/Entity/EntityTypeManager.php, line 194
Class
- EntityTypeManager
- Manages entity type plugin definitions.
Namespace
Drupal\Core\EntityCode
public function getRouteProviders($entity_type) { if (!isset($this->handlers['route_provider'][$entity_type])) { $route_provider_classes = $this->getDefinition($entity_type, TRUE)->getRouteProviderClasses(); foreach ($route_provider_classes as $type => $class) { $this->handlers['route_provider'][$entity_type][$type] = $this->createHandlerInstance($class, $this->getDefinition($entity_type)); } } return isset($this->handlers['route_provider'][$entity_type]) ? $this->handlers['route_provider'][$entity_type] : []; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!EntityTypeManager.php/function/EntityTypeManager::getRouteProviders/8.1.x