function ContentEntityBase::id

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::id()
  2. 10 core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::id()
  3. 8.9.x core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::id()
6 calls to ContentEntityBase::id()
User::hasPermission in core/modules/user/src/Entity/User.php
Checks whether a user has a certain permission.
User::isAnonymous in core/modules/user/src/Entity/User.php
Returns TRUE if the account is anonymous.
User::isAuthenticated in core/modules/user/src/Entity/User.php
Returns TRUE if the account is authenticated.
User::isNew in core/modules/user/src/Entity/User.php
Determines whether the entity is new.
User::postSave in core/modules/user/src/Entity/User.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 538

Class

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

Namespace

Drupal\Core\Entity

Code

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

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