public function __construct(EntityDefinitionUpdateManagerInterface
$entityDefinitionUpdateManager, EntityLastInstalledSchemaRepositoryInterface
$entityLastInstalledSchemaRepository, WorkspaceManagerInterface
$workspace_manager) { $this->entityDefinitionUpdateManager =
$entityDefinitionUpdateManager;
$this->entityLastInstalledSchemaRepository =
$entityLastInstalledSchemaRepository;
$this->workspaceManager =
$workspace_manager;
} /**
* {@inheritdoc}
*/
public static function getSubscribedEvents(): array
{ return static::
getEntityTypeEvents();
} /**
* {@inheritdoc}
*/
public function onEntityTypeCreate(EntityTypeInterface
$entity_type) { // If the entity type is supported by Workspaces, add the revision metadata
// field.
if ($this->workspaceManager->
isEntityTypeSupported($entity_type)) { $this->
addRevisionMetadataField($entity_type);
} }