function EntityInterface::bundle

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityInterface.php \Drupal\Core\Entity\EntityInterface::bundle()
  2. 8.9.x core/lib/Drupal/Core/Entity/EntityInterface.php \Drupal\Core\Entity\EntityInterface::bundle()
  3. 11.x core/lib/Drupal/Core/Entity/EntityInterface.php \Drupal\Core\Entity\EntityInterface::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.

2 methods override EntityInterface::bundle()
EntityBase::bundle in core/lib/Drupal/Core/Entity/EntityBase.php
ViewUI::bundle in core/modules/views_ui/src/ViewUI.php

File

core/lib/Drupal/Core/Entity/EntityInterface.php, line 88

Class

EntityInterface
Defines a common interface for all entity objects.

Namespace

Drupal\Core\Entity

Code

public function bundle();

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