You are here

public function EntityHelper::getBundleLabel in Simple XML sitemap 4.x

Parameters

string $entity_type_id:

string $bundle_name:

Return value

mixed

File

src/Entity/EntityHelper.php, line 62

Class

EntityHelper
Helper class for working with entities.

Namespace

Drupal\simple_sitemap\Entity

Code

public function getBundleLabel(string $entity_type_id, string $bundle_name) {
  return $this
    ->getBundleInfo($entity_type_id)[$bundle_name]['label'] ?? $bundle_name;

  // Menu fix.
}