function EntityFieldManager::clearCachedFieldDefinitions
Same name in other branches
- 9 core/lib/Drupal/Core/Entity/EntityFieldManager.php \Drupal\Core\Entity\EntityFieldManager::clearCachedFieldDefinitions()
- 8.9.x core/lib/Drupal/Core/Entity/EntityFieldManager.php \Drupal\Core\Entity\EntityFieldManager::clearCachedFieldDefinitions()
- 10 core/lib/Drupal/Core/Entity/EntityFieldManager.php \Drupal\Core\Entity\EntityFieldManager::clearCachedFieldDefinitions()
Overrides EntityFieldManagerInterface::clearCachedFieldDefinitions
File
-
core/
lib/ Drupal/ Core/ Entity/ EntityFieldManager.php, line 617
Class
- EntityFieldManager
- Manages the discovery of entity fields.
Namespace
Drupal\Core\EntityCode
public function clearCachedFieldDefinitions() {
$this->baseFieldDefinitions = [];
$this->fieldDefinitions = [];
$this->fieldStorageDefinitions = [];
$this->activeFieldStorageDefinitions = [];
$this->fieldMap = [];
$this->fieldMapByFieldType = [];
$this->entityDisplayRepository
->clearDisplayModeInfo();
$this->extraFields = NULL;
Cache::invalidateTags([
'entity_field_info',
]);
// The typed data manager statically caches prototype objects with injected
// definitions, clear those as well.
$this->typedDataManager
->clearCachedDefinitions();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.