public function EntityBase::id in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Entity/EntityBase.php \Drupal\Core\Entity\EntityBase::id()
- 10 core/lib/Drupal/Core/Entity/EntityBase.php \Drupal\Core\Entity\EntityBase::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
22 calls to EntityBase::id()
- Block::getPluginCollection in core/
modules/ block/ src/ Entity/ Block.php - Encapsulates the creation of the block's LazyPluginCollection.
- ConfigEntityBase::getConfigDependencyName in core/
lib/ Drupal/ Core/ Config/ Entity/ ConfigEntityBase.php - Gets the configuration dependency name.
- ConfigEntityBase::getConfigTarget in core/
lib/ Drupal/ Core/ Config/ Entity/ ConfigEntityBase.php - Gets the configuration target identifier for the entity.
- ConfigEntityBase::preSave in core/
lib/ Drupal/ Core/ Config/ Entity/ ConfigEntityBase.php - Acts on an entity before the presave hook is invoked.
- ConfigEntityBase::toArray in core/
lib/ Drupal/ Core/ Config/ Entity/ ConfigEntityBase.php - Gets an array of all property values.
11 methods override EntityBase::id()
- ContentEntityBase::id in core/
lib/ Drupal/ Core/ Entity/ ContentEntityBase.php - Gets the identifier.
- ContentLanguageSettings::id in core/
modules/ language/ src/ Entity/ ContentLanguageSettings.php - Gets the identifier.
- Editor::id in core/
modules/ editor/ src/ Entity/ Editor.php - Gets the identifier.
- EntityDisplayBase::id in core/
lib/ Drupal/ Core/ Entity/ EntityDisplayBase.php - Gets the identifier.
- FieldConfigBase::id in core/
lib/ Drupal/ Core/ Field/ FieldConfigBase.php - Gets the identifier.
File
- core/
lib/ Drupal/ Core/ Entity/ EntityBase.php, line 106
Class
- EntityBase
- Defines a base entity class.
Namespace
Drupal\Core\EntityCode
public function id() {
return isset($this->id) ? $this->id : NULL;
}