function EntityLastInstalledSchemaRepository::getLastInstalledFieldStorageDefinitions

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

File

core/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepository.php, line 120

Class

EntityLastInstalledSchemaRepository
Provides a repository for installed entity definitions.

Namespace

Drupal\Core\Entity

Code

public function getLastInstalledFieldStorageDefinitions($entity_type_id) {
  if ($cache = $this->cacheBackend
    ->get($entity_type_id . '.field_storage_definitions.installed')) {
    return $cache->data;
  }
  $definitions = $this->keyValueFactory
    ->get('entity.definitions.installed')
    ->get($entity_type_id . '.field_storage_definitions', []);
  $this->cacheBackend
    ->set($entity_type_id . '.field_storage_definitions.installed', $definitions, Cache::PERMANENT);
  return $definitions;
}

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