You are here

public function ContentEntityBase::id in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::id()

Gets the identifier.

Return value

string|int|null The entity identifier, or NULL if the object does not yet have an identifier.

Overrides Entity::id

11 calls to ContentEntityBase::id()
Comment::permalink in core/modules/comment/src/Entity/Comment.php
Returns the permalink URL for this comment.
ContentEntityBase::hasTranslationChanges in core/lib/Drupal/Core/Entity/ContentEntityBase.php
Determines if the current translation of the entity has unsaved changes.
MenuLinkContent::getPluginDefinition in core/modules/menu_link_content/src/Entity/MenuLinkContent.php
Builds up the menu link plugin definition for this entity.
Node::postSave in core/modules/node/src/Entity/Node.php
Acts on a saved entity before the insert or update hook is invoked.
Term::postSave in core/modules/taxonomy/src/Entity/Term.php
Acts on a saved entity before the insert or update hook is invoked.

... See full list

File

core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 425
Contains \Drupal\Core\Entity\ContentEntityBase.

Class

ContentEntityBase
Implements Entity Field API specific enhancements to the Entity class.

Namespace

Drupal\Core\Entity

Code

public function id() {
  return $this
    ->getEntityKey('id');
}