You are here

public function EntityBase::bundle in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityBase.php \Drupal\Core\Entity\EntityBase::bundle()

Gets the bundle of the entity.

Return value

string The bundle of the entity. Defaults to the entity type ID if the entity type does not make use of different bundles.

Overrides EntityInterface::bundle

5 calls to EntityBase::bundle()
EntityBase::access in core/lib/Drupal/Core/Entity/EntityBase.php
Checks data value access.
EntityBase::getConfigDependencyName in core/lib/Drupal/Core/Entity/EntityBase.php
Gets the configuration dependency name.
EntityBase::getListCacheTagsToInvalidate in core/lib/Drupal/Core/Entity/EntityBase.php
The list cache tags to invalidate for this entity.
EntityBase::toUrl in core/lib/Drupal/Core/Entity/EntityBase.php
Gets the URL object for the entity.
EntityBase::urlRouteParameters in core/lib/Drupal/Core/Entity/EntityBase.php
Gets an array of placeholders for this entity.
1 method overrides EntityBase::bundle()
ContentEntityBase::bundle in core/lib/Drupal/Core/Entity/ContentEntityBase.php
Gets the bundle of the entity.

File

core/lib/Drupal/Core/Entity/EntityBase.php, line 159

Class

EntityBase
Defines a base entity class.

Namespace

Drupal\Core\Entity

Code

public function bundle() {
  return $this->entityTypeId;
}