You are here

protected function ContentEntity::getEntityBundles in Search API 8

Retrieves all bundles of this datasource's entity type.

Return value

array An associative array of bundle infos, keyed by the bundle names.

3 calls to ContentEntity::getEntityBundles()
ContentEntity::getBundles in src/Plugin/search_api/datasource/ContentEntity.php
Retrieves the bundles associated to this datasource.
ContentEntity::getEntityBundleOptions in src/Plugin/search_api/datasource/ContentEntity.php
Retrieves the available bundles of this entity type as an options list.
ContentEntity::getPartialItemIds in src/Plugin/search_api/datasource/ContentEntity.php

File

src/Plugin/search_api/datasource/ContentEntity.php, line 773

Class

ContentEntity
Represents a datasource which exposes the content entities.

Namespace

Drupal\search_api\Plugin\search_api\datasource

Code

protected function getEntityBundles() {
  return $this
    ->hasBundles() ? $this
    ->getEntityTypeBundleInfo()
    ->getBundleInfo($this
    ->getEntityTypeId()) : [];
}