public function EntityTypeBundleInfo::getBundleInfo in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Entity/EntityTypeBundleInfo.php \Drupal\Core\Entity\EntityTypeBundleInfo::getBundleInfo()
Gets the bundle info of an entity type.
Parameters
string $entity_type: The entity type.
Return value
array Returns the bundle information for the specified entity type.
Overrides EntityTypeBundleInfoInterface::getBundleInfo
File
- core/
lib/ Drupal/ Core/ Entity/ EntityTypeBundleInfo.php, line 84 - Contains \Drupal\Core\Entity\EntityTypeBundleInfo.
Class
- EntityTypeBundleInfo
- Provides discovery and retrieval of entity type bundles.
Namespace
Drupal\Core\EntityCode
public function getBundleInfo($entity_type) {
$bundle_info = $this
->getAllBundleInfo();
return isset($bundle_info[$entity_type]) ? $bundle_info[$entity_type] : [];
}