- Issue created by @acbramley
- 🇬🇧United Kingdom longwave UK
Given the function is just
return array_map(function ($bundle_info) { return $bundle_info['label']; }, \Drupal::service('entity_type.bundle.info')->getBundleInfo('node'));
this could be added as a convenience method to EntityTypeBundleInfo so you can call e.g.
$labels = \Drupal::service('entity_type.bundle.info')->getBundleLabels('node');
- 🇦🇺Australia acbramley
I like that approach, adding a new method to an interface is always contentious but let's see.