You are here

public function ContentEntityBase::bundle in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::bundle()
  2. 9 core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::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 EntityBase::bundle

6 calls to ContentEntityBase::bundle()
ContentEntityBase::access in core/lib/Drupal/Core/Entity/ContentEntityBase.php
Checks data value access.
ContentEntityBase::getFieldDefinitions in core/lib/Drupal/Core/Entity/ContentEntityBase.php
Gets an array of field definitions of all contained fields.
ContentEntityBase::getFieldsToSkipFromTranslationChangesCheck in core/lib/Drupal/Core/Entity/ContentEntityBase.php
Returns an array of field names to skip in ::hasTranslationChanges.
ContentEntityBase::isDefaultTranslationAffectedOnly in core/lib/Drupal/Core/Entity/ContentEntityBase.php
Checks if untranslatable fields should affect only the default translation.
ContentEntityBase::isTranslatable in core/lib/Drupal/Core/Entity/ContentEntityBase.php
Returns the translation support status.

... See full list

File

core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 545

Class

ContentEntityBase
Implements Entity Field API specific enhancements to the Entity class.

Namespace

Drupal\Core\Entity

Code

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