public function ContentEntityBase::id in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::id()
- 9 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 EntityBase::id
5 calls to ContentEntityBase::id()
- ContentEntityBase::hasTranslationChanges in core/
lib/ Drupal/ Core/ Entity/ ContentEntityBase.php - Determines if the current translation of the entity has unsaved changes.
- ContentEntityBase::isLatestRevision in core/
lib/ Drupal/ Core/ Entity/ ContentEntityBase.php - Checks if this entity is the latest revision.
- ContentEntityBase::isLatestTranslationAffectedRevision in core/
lib/ Drupal/ Core/ Entity/ ContentEntityBase.php - Checks whether this is the latest revision affecting this translation.
- Media::prepareSave in core/
modules/ media/ src/ Entity/ Media.php - Sets the media entity's field values from the source's metadata.
- MenuLinkContent::getPluginDefinition in core/
modules/ menu_link_content/ src/ Entity/ MenuLinkContent.php - Builds up the menu link plugin definition for this entity.
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\EntityCode
public function id() {
return $this
->getEntityKey('id');
}