public function BundlePluginHandler::getBundleInfo in Entity API 8
Gets the bundle info.
Return value
array An array of bundle information keyed by the bundle name. The format expected by hook_entity_bundle_info().
Overrides BundlePluginHandlerInterface::getBundleInfo
File
- src/
BundlePlugin/ BundlePluginHandler.php, line 51
Class
Namespace
Drupal\entity\BundlePluginCode
public function getBundleInfo() {
$bundles = [];
foreach ($this->pluginManager
->getDefinitions() as $plugin_id => $definition) {
$bundles[$plugin_id] = [
'label' => $definition['label'],
'description' => isset($definition['description']) ? $definition['description'] : '',
'translatable' => $this->entityType
->isTranslatable(),
'provider' => $definition['provider'],
];
}
return $bundles;
}