function Drupal::entityTypeManager

Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal.php \Drupal::entityTypeManager()
  2. 10 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.

58 calls to Drupal::entityTypeManager()
aggregator_entity_extra_field_info in core/modules/aggregator/aggregator.module
Implements hook_entity_extra_field_info().
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.

... See full list

File

core/lib/Drupal.php, line 322

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.