// the cache doesn't get stale after the event has fired.
if ($this->updateLiveDefinitions
) { $this->entityTypeManager->
getDefinition($entity_type->
id());
$this->state->
set('entity_test_rev.entity_type', ''
);
} } /**
* {@inheritdoc}
*/
public function onFieldStorageDefinitionCreate(FieldStorageDefinitionInterface
$storage_definition) { if (isset($this->entityLastInstalledSchemaRepository->
getLastInstalledFieldStorageDefinitions($storage_definition->
getTargetEntityTypeId())[$storage_definition->
getName()])) { $this->
storeDefinitionUpdate(FieldStorageDefinitionEvents::CREATE
);
} $this->
storeEvent(FieldStorageDefinitionEvents::CREATE
);
// Retrieve the live field storage definitions in order to warm the static
// cache and then insert the new storage definition, so we can test that the
// cache doesn't get stale after the event has fired.
if ($this->updateLiveDefinitions
) { $this->entityFieldManager->
getFieldStorageDefinitions($storage_definition->
getTargetEntityTypeId());
$this->state->
set('entity_test_rev.additional_base_field_definitions',
[$storage_definition->
getName() =>
$storage_definition]);
} }