function EntityBase::id

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Entity/EntityBase.php \Drupal\Core\Entity\EntityBase::id()
  2. 10 core/lib/Drupal/Core/Entity/EntityBase.php \Drupal\Core\Entity\EntityBase::id()
  3. 9 core/lib/Drupal/Core/Entity/EntityBase.php \Drupal\Core\Entity\EntityBase::id()
  4. 8.9.x core/lib/Drupal/Core/Entity/EntityBase.php \Drupal\Core\Entity\EntityBase::id()
8 calls to EntityBase::id()
ConfigTest::postSave in core/modules/config/tests/config_test/src/Entity/ConfigTest.php
Acts on a saved entity before the insert or update hook is invoked.
ConfigurableLanguage::getId in core/modules/language/src/Entity/ConfigurableLanguage.php
Gets the ID (language code).
ConfigurableLanguage::isDefault in core/modules/language/src/Entity/ConfigurableLanguage.php
Returns whether this language is the default language.
ConfigurableLanguage::postSave in core/modules/language/src/Entity/ConfigurableLanguage.php
Acts on a saved entity before the insert or update hook is invoked.
SearchPage::getPluginCollection in core/modules/search/src/Entity/SearchPage.php
Encapsulates the creation of the search page's LazyPluginCollection.

... See full list

4 methods override EntityBase::id()
ContentLanguageSettings::id in core/modules/language/src/Entity/ContentLanguageSettings.php
Gets the identifier.
FieldStorageConfig::id in core/modules/field/src/Entity/FieldStorageConfig.php
Gets the identifier.
FilterFormat::id in core/modules/filter/src/Entity/FilterFormat.php
Gets the identifier.
NodeType::id in core/modules/node/src/Entity/NodeType.php
Gets the identifier.

File

core/lib/Drupal/Core/Entity/EntityBase.php, line 122

Class

EntityBase
Defines a base entity class.

Namespace

Drupal\Core\Entity

Code

public function id() {
  return $this->id ?? NULL;
}

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