function Drupal::entityTypeManager

Same name in other branches
  1. 9 core/lib/Drupal.php \Drupal::entityTypeManager()
  2. 8.9.x core/lib/Drupal.php \Drupal::entityTypeManager()
  3. 11.x core/lib/Drupal.php \Drupal::entityTypeManager()

Retrieves the entity type manager.

Return value

\Drupal\Core\Entity\EntityTypeManagerInterface The entity type manager.

67 calls to Drupal::entityTypeManager()
BaseFieldOverride::postDelete in core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php
Acts on deleted entities before the delete hook is invoked.
CommentTestTrait::addDefaultCommentField in core/modules/comment/src/Tests/CommentTestTrait.php
Adds the default comment field to an entity.
CommentTranslationUITest::doTestPublishedStatus in core/modules/comment/tests/src/Functional/CommentTranslationUITest.php
Tests the translation publishing status.
ConfigImportAllTest::testInstallUninstall in core/modules/config/tests/src/Functional/ConfigImportAllTest.php
Tests that a fixed set of modules can be installed and uninstalled.
config_translation_config_translation_info in core/modules/config_translation/config_translation.module
Implements hook_config_translation_info().

... See full list

File

core/lib/Drupal.php, line 314

Class

Drupal
Static Service Container wrapper.

Code

public static function entityTypeManager() {
    return static::getContainer()->get('entity_type.manager');
}

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