Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Core/Entity/EntityTypeBundleInfo.php \Drupal\Core\Entity\EntityTypeBundleInfo::getBundleInfo()
  2. 9 core/lib/Drupal/Core/Entity/EntityTypeBundleInfo.php \Drupal\Core\Entity\EntityTypeBundleInfo::getBundleInfo()

File

core/lib/Drupal/Core/Entity/EntityTypeBundleInfo.php, line 79

Class

EntityTypeBundleInfo
Provides discovery and retrieval of entity type bundles.

Namespace

Drupal\Core\Entity

Code

public function getBundleInfo($entity_type_id) {
  $bundle_info = $this
    ->getAllBundleInfo();
  return $bundle_info[$entity_type_id] ?? [];
}