function Drupal::typedDataManager

Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal.php \Drupal::typedDataManager()
  2. 10 core/lib/Drupal.php \Drupal::typedDataManager()
  3. 11.x core/lib/Drupal.php \Drupal::typedDataManager()

Returns the typed data manager service.

Use the typed data manager service for creating typed data objects.

Return value

\Drupal\Core\TypedData\TypedDataManagerInterface The typed data manager.

See also

\Drupal\Core\TypedData\TypedDataManager::create()

5 calls to Drupal::typedDataManager()
DrupalTest::testTypedDataManager in core/tests/Drupal/Tests/Core/DrupalTest.php
Tests the typedDataManager() method.
EntityBase::getTypedDataClass in core/lib/Drupal/Core/Entity/EntityBase.php
Returns the typed data class name for this entity.
MapDataNormalizerTest::setUp in core/modules/serialization/tests/src/Kernel/MapDataNormalizerTest.php
TypedDataTrait::getTypedDataManager in core/lib/Drupal/Core/TypedData/TypedDataTrait.php
Gets the typed data manager.
UserPasswordForm::__construct in core/modules/user/src/Form/UserPasswordForm.php
Constructs a UserPasswordForm object.

File

core/lib/Drupal.php, line 563

Class

Drupal
Static Service Container wrapper.

Code

public static function typedDataManager() {
    return static::getContainer()->get('typed_data_manager');
}

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