/** * {@inheritdoc} */ 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(); }