Alter defined entity properties.
array $info: The property info array as returned by hook_entity_field_info().
string $entity_type: The entity type for which entity properties are defined.
function hook_entity_field_info_alter(&$info, $entity_type) {
if (!empty($info['definitions']['mymodule_text'])) {
// Alter the mymodule_text property to use a custom class.
$info['definitions']['mymodule_text']['class'] = '\\Drupal\\anothermodule\\EntityComputedText';
}
}