You are here

public function ContentEntityBase::bundle in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 Entity::bundle

5 calls to ContentEntityBase::bundle()
Comment::getTypeId in core/modules/comment/src/Entity/Comment.php
Get the comment type ID for this comment.
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.
Message::isPersonal in core/modules/contact/src/Entity/Message.php
Returns TRUE if this is the personal contact form.
Node::getType in core/modules/node/src/Entity/Node.php
Gets the node type.

File

core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 432
Contains \Drupal\Core\Entity\ContentEntityBase.

Class

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

Namespace

Drupal\Core\Entity

Code

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