function EntityBase::getEntityType

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityBase.php \Drupal\Core\Entity\EntityBase::getEntityType()
  2. 8.9.x core/lib/Drupal/Core/Entity/EntityBase.php \Drupal\Core\Entity\EntityBase::getEntityType()
  3. 10 core/lib/Drupal/Core/Entity/EntityBase.php \Drupal\Core\Entity\EntityBase::getEntityType()

Overrides EntityInterface::getEntityType

5 calls to EntityBase::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::wasDefaultRevision in core/lib/Drupal/Core/Entity/ContentEntityBase.php
EntityBase::createDuplicate in core/lib/Drupal/Core/Entity/EntityBase.php
Creates a duplicate of the entity.

File

core/lib/Drupal/Core/Entity/EntityBase.php, line 386

Class

EntityBase
Defines a base entity class.

Namespace

Drupal\Core\Entity

Code

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

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