Entity::id

public Entity::id() Gets the identifier. Return value string|int|null The entity identifier, or NULL if the object does not yet have an identifier. Overrides EntityInterface::id File core/lib/Drupal/Core/Entity/Entity.php, line 111 Class Entity Defines a base entity class. Namespace Drupal\Core\Entity Code public function id() { return isset($this->id) ? $this->id : NULL; }

Entity::hasLinkTemplate

public Entity::hasLinkTemplate($rel) Indicates if a link template exists for a given key. Parameters string $key: The link type. Return value bool TRUE if the link template exists, FALSE otherwise. Overrides EntityInterface::hasLinkTemplate File core/lib/Drupal/Core/Entity/Entity.php, line 240 Class Entity Defines a base entity class. Namespace Drupal\Core\Entity Code public function hasLinkTemplate($rel) { $link_templates = $this->linkTemplates(); return isset($link_templates

Entity::getTypedData

public Entity::getTypedData() Gets a typed data object for this entity object. The returned typed data object wraps this entity and allows dealing with entities based on the generic typed data API. Return value \Drupal\Core\TypedData\ComplexDataInterface The typed data object for this entity. Overrides EntityInterface::getTypedData See also \Drupal\Core\TypedData\TypedDataInterface File core/lib/Drupal/Core/Entity/Entity.php, line 594 Class Entity Defines a base entity class. Namespace

Entity::getOriginalId

public Entity::getOriginalId() Gets the original ID. Return value int|string|null The original ID, or NULL if no ID was set or for entity types that do not support renames. Overrides EntityInterface::getOriginalId File core/lib/Drupal/Core/Entity/Entity.php, line 565 Class Entity Defines a base entity class. Namespace Drupal\Core\Entity Code public function getOriginalId() { // By default, entities do not support renames and do not have original IDs. return NULL; }

Entity::getEntityTypeId

public Entity::getEntityTypeId() Gets the ID of the type of the entity. Return value string The entity type ID. Overrides EntityInterface::getEntityTypeId File core/lib/Drupal/Core/Entity/Entity.php, line 141 Class Entity Defines a base entity class. Namespace Drupal\Core\Entity Code public function getEntityTypeId() { return $this->entityTypeId; }

Entity::getEntityType

public Entity::getEntityType() Gets the entity type definition. Return value \Drupal\Core\Entity\EntityTypeInterface The entity type definition. Overrides EntityInterface::getEntityType 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()); }

Entity::getConfigTarget

public Entity::getConfigTarget() Gets the configuration target identifier for the entity. Used to supply the correct format for storing a reference targeting this entity in configuration. Return value string The configuration target identifier. Overrides EntityInterface::getConfigTarget File core/lib/Drupal/Core/Entity/Entity.php, line 627 Class Entity Defines a base entity class. Namespace Drupal\Core\Entity Code public function getConfigTarget() { // For content entities, use the

Entity::getConfigDependencyName

public Entity::getConfigDependencyName() Gets the configuration dependency name. Configuration entities can depend on content and configuration entities. They store an array of content and config dependency names in their "dependencies" key. Return value string The configuration dependency name. Overrides EntityInterface::getConfigDependencyName See also \Drupal\Core\Config\Entity\ConfigDependencyManager File core/lib/Drupal/Core/Entity/Entity.php, line 620 Class Entity Defines a base en

Entity::getConfigDependencyKey

public Entity::getConfigDependencyKey() Gets the key that is used to store configuration dependencies. Return value string The key to be used in configuration dependencies when storing dependencies on entities of this type. Overrides EntityInterface::getConfigDependencyKey See also \Drupal\Core\Entity\EntityTypeInterface::getConfigDependencyKey() File core/lib/Drupal/Core/Entity/Entity.php, line 613 Class Entity Defines a base entity class. Namespace Drupal\Core\Entity Code public fu

Entity::getCacheTagsToInvalidate

public Entity::getCacheTagsToInvalidate() Returns the cache tags that should be used to invalidate caches. This will not return additional cache tags added through addCacheTags(). Return value string[] Set of cache tags. Overrides EntityInterface::getCacheTagsToInvalidate See also \Drupal\Core\Cache\RefinableCacheableDependencyInterface::addCacheTags() \Drupal\Core\Cache\CacheableDependencyInterface::getCacheTags() File core/lib/Drupal/Core/Entity/Entity.php, line 468 Class Entity Define