function ConfigOtherModuleTest::getStorage

Same name in other branches
  1. 9 core/modules/config/tests/src/Functional/ConfigOtherModuleTest.php \Drupal\Tests\config\Functional\ConfigOtherModuleTest::getStorage()
  2. 8.9.x core/modules/config/tests/src/Functional/ConfigOtherModuleTest.php \Drupal\Tests\config\Functional\ConfigOtherModuleTest::getStorage()
  3. 11.x core/modules/config/tests/src/Kernel/ConfigOtherModuleTest.php \Drupal\Tests\config\Kernel\ConfigOtherModuleTest::getStorage()

Gets the provided entity type's storage.

Parameters

string $entity_type_id: (optional) The entity type ID to get a storage for. Defaults to 'config_test'.

Return value

\Drupal\Core\Entity\EntityStorageInterface The entity type's storage.

File

core/modules/config/tests/src/Kernel/ConfigOtherModuleTest.php, line 154

Class

ConfigOtherModuleTest
Tests default configuration provided by a module that does not own it.

Namespace

Drupal\Tests\config\Kernel

Code

protected function getStorage(string $entity_type_id = 'config_test') : EntityStorageInterface {
    return \Drupal::entityTypeManager()->getStorage($entity_type_id);
}

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