public function EntityFieldManager::clearCachedFieldDefinitions in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Entity/EntityFieldManager.php \Drupal\Core\Entity\EntityFieldManager::clearCachedFieldDefinitions()
Clears static and persistent field definition caches.
Overrides EntityFieldManagerInterface::clearCachedFieldDefinitions
File
- core/
lib/ Drupal/ Core/ Entity/ EntityFieldManager.php, line 539 - Contains \Drupal\Core\Entity\EntityFieldManager.
Class
- EntityFieldManager
- Manages the discovery of entity fields.
Namespace
Drupal\Core\EntityCode
public function clearCachedFieldDefinitions() {
$this->baseFieldDefinitions = [];
$this->fieldDefinitions = [];
$this->fieldStorageDefinitions = [];
$this->fieldMap = [];
$this->fieldMapByFieldType = [];
$this->entityDisplayRepository
->clearDisplayModeInfo();
$this->extraFields = [];
Cache::invalidateTags([
'entity_field_info',
]);
// The typed data manager statically caches prototype objects with injected
// definitions, clear those as well.
$this->typedDataManager
->clearCachedDefinitions();
}