function 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();
}