Returns the entity identifier (the entity's machine name or numeric ID).
Return value
The identifier of the entity, or NULL if the entity does not yet have
an identifier.
File
- drupal/core/lib/Drupal/Core/Entity/EntityInterface.php, line 39
- Contains \Drupal\Core\Entity\EntityInterface.
Class
- EntityInterface
- Defines a common interface for all entity objects.
Namespace
Drupal\Core\Entity
Code
public function id();