function EntityRouteHelper::doGetContentEntityPaths

1 call to EntityRouteHelper::doGetContentEntityPaths()
EntityRouteHelper::getContentEntityPaths in core/modules/navigation/src/EntityRouteHelper.php
Returns the paths for the link templates of all content entities.

File

core/modules/navigation/src/EntityRouteHelper.php, line 96

Class

EntityRouteHelper
Helper service to detect entity routes.

Namespace

Drupal\navigation

Code

protected function doGetContentEntityPaths() : array {
  $content_entity_paths = [];
  $entity_types = $this->entityTypeManager
    ->getDefinitions();
  foreach ($entity_types as $entity_type) {
    if ($entity_type->entityClassImplements(ContentEntityInterface::class)) {
      $entity_paths = $this->getContentEntityTypePaths($entity_type);
      $content_entity_paths = array_merge($content_entity_paths, $entity_paths);
    }
  }
  return $content_entity_paths;
}

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