function entity_test_mul_load

Loads a test entity.

Parameters

int $id: A test entity ID.

bool $reset: A boolean indicating that the internal cache should be reset.

Return value

\Drupal\entity_test\Entity\EntityTestMul The loaded entity object, or FALSE if the entity cannot be loaded.

Deprecated

in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal::entityTypeManager()->getStorage('entity_test_mul')->load().

See also

https://www.drupal.org/node/2266845

File

core/modules/system/tests/modules/entity_test/entity_test.module, line 424

Code

function entity_test_mul_load($id, $reset = FALSE) {
    @trigger_error('entity_test_mul_load() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \\Drupal::entityTypeManager()->getStorage(\'entity_test_mul\')->load(). See https://www.drupal.org/node/2266845', E_USER_DEPRECATED);
    $storage = \Drupal::entityTypeManager()->getStorage('entity_test_mul');
    if ($reset) {
        $storage->resetCache([
            $id,
        ]);
    }
    return $storage->load($id);
}

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