EntityTypeBundleInfo
class EntityTypeBundleInfo implements EntityTypeBundleInfoInterface (View source)
Provides discovery and retrieval of entity type bundles.
Traits
Provides methods to use a cache backend while respecting a 'use caches' flag.
Properties
| protected CacheBackendInterface | $cacheBackend | Cache backend instance. |
from UseCacheBackendTrait |
| protected bool | $useCaches | Flag whether caches should be used or skipped. |
from UseCacheBackendTrait |
| protected array | $bundleInfo | Static cache of bundle information. |
|
| protected LanguageManagerInterface | $languageManager | The language manager. |
|
| protected ModuleHandlerInterface | $moduleHandler | The module handler. |
|
| protected TypedDataManagerInterface | $typedDataManager | The typed data manager. |
|
| protected EntityTypeManagerInterface | $entityTypeManager | The entity type manager. |
Methods
Fetches from the cache backend, respecting the use caches flag.
Stores data in the persistent cache, respecting the use caches flag.
Constructs a new EntityTypeBundleInfo.
Gets the bundle info of an entity type.
Get the bundle info of all entity types.
Clears static and persistent bundles.
Details
protected object|false
cacheGet(string $cid)
Fetches from the cache backend, respecting the use caches flag.
protected
cacheSet(string $cid, mixed $data, int $expire = Cache::PERMANENT, array $tags = [])
Stores data in the persistent cache, respecting the use caches flag.
__construct(EntityTypeManagerInterface $entity_type_manager, LanguageManagerInterface $language_manager, ModuleHandlerInterface $module_handler, TypedDataManagerInterface $typed_data_manager, CacheBackendInterface $cache_backend)
Constructs a new EntityTypeBundleInfo.
array
getBundleInfo(string $entity_type_id)
Gets the bundle info of an entity type.
array
getAllBundleInfo()
Get the bundle info of all entity types.
clearCachedBundles()
Clears static and persistent bundles.