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. 10 core/modules/config/tests/src/Kernel/ConfigOtherModuleTest.php \Drupal\Tests\config\Kernel\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/Functional/ConfigOtherModuleTest.php, line 149

Class

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

Namespace

Drupal\Tests\config\Functional

Code

protected function getStorage($entity_type_id = 'config_test') {
    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.