8.5.x Entity.php Entity::getEntityType()
8.0.x Entity.php Entity::getEntityType()
8.1.x Entity.php Entity::getEntityType()
8.2.x Entity.php Entity::getEntityType()
8.3.x Entity.php Entity::getEntityType()
8.4.x Entity.php Entity::getEntityType()
8.6.x Entity.php Entity::getEntityType()

Gets the entity type definition.

Return value

\Drupal\Core\Entity\EntityTypeInterface The entity type definition.

Overrides EntityInterface::getEntityType

6 calls to Entity::getEntityType()
ConfigEntityBase::toArray in core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
Gets an array of all property values.
ConfigEntityBundleBase::preSave in core/lib/Drupal/Core/Config/Entity/ConfigEntityBundleBase.php
Acts on an entity before the presave hook is invoked.
ContentEntityBase::createDuplicate in core/lib/Drupal/Core/Entity/ContentEntityBase.php
Creates a duplicate of the entity.
ContentEntityBase::label in core/lib/Drupal/Core/Entity/ContentEntityBase.php
Gets the label of the entity.
Entity::createDuplicate in core/lib/Drupal/Core/Entity/Entity.php
Creates a duplicate of the entity.

... See full list

File

core/lib/Drupal/Core/Entity/Entity.php, line 396

Class

Entity
Defines a base entity class.

Namespace

Drupal\Core\Entity

Code

public function getEntityType() {
  return $this
    ->entityManager()
    ->getDefinition($this
    ->getEntityTypeId());
}