function ContentEntityBase::bundle

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::bundle()
  2. 10 core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::bundle()
  3. 9 core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::bundle()
  4. 8.9.x core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::bundle()
3 calls to ContentEntityBase::bundle()
Comment::getTypeId in core/modules/comment/src/Entity/Comment.php
Get the comment type ID for this comment.
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 576

Class

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

Namespace

Drupal\Core\Entity

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.