add Publishable events

@andrey1s you have 2 identical variables `$metadata` and `$classMetadata`. Please use one and remove another. I prefer to use `$classMetadata`.