8.2.x Entity.php public Entity::getEntityType()
8.0.x Entity.php public Entity::getEntityType()
8.1.x Entity.php public Entity::getEntityType()
8.3.x Entity.php public Entity::getEntityType()

Gets the entity type definition.

Return value

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

Overrides EntityInterface::getEntityType

24 calls to Entity::getEntityType()
ConfigEntityBase::addDependency in core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
Overrides \Drupal\Core\Entity\DependencyTrait:addDependency().
ConfigEntityBase::getConfigDependencyName in core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
Gets the configuration dependency name.
ConfigEntityBase::invalidateTagsOnSave in core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
Override to never invalidate the entity's cache tag; the config system already invalidates it.
ConfigEntityBase::toArray in core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
Gets an array of all property values.
ConfigEntityBundleBase::loadDisplays in core/lib/Drupal/Core/Config/Entity/ConfigEntityBundleBase.php
Returns view or form displays for this bundle.

... 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());
}