You are here

public function BackgroundImageManager::getEntityTypeBundles in Background Image 2.0.x

Same name and namespace in other branches
  1. 8 src/BackgroundImageManager.php \Drupal\background_image\BackgroundImageManager::getEntityTypeBundles()
  2. 2.x src/BackgroundImageManager.php \Drupal\background_image\BackgroundImageManager::getEntityTypeBundles()

Retrieves the bundle info for a given entity type.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: An EntityTypeInterface object.

Return value

array An array of bundle information where the outer array is keyed by the bundle name, or the entity type name if the entity does not have bundles. The inner arrays are associative arrays of bundle information, such as the label for the bundle.

Overrides BackgroundImageManagerInterface::getEntityTypeBundles

1 call to BackgroundImageManager::getEntityTypeBundles()
BackgroundImageManager::getEnabledEntityTypeBundles in src/BackgroundImageManager.php
Retrieves the enabled bundles for an entity type.

File

src/BackgroundImageManager.php, line 572

Class

BackgroundImageManager

Namespace

Drupal\background_image

Code

public function getEntityTypeBundles(EntityTypeInterface $entity_type) {
  return $this->entityTypeBundleInfo
    ->getBundleInfo($entity_type
    ->id());
}