Add new Method to a custom core viewlet class and template?

I'm just refered the Viewlets — Plone Documentation v5.2 and try to add a new method.I just need to add a method that returns a content and the snippet to its template.How can i do?

  • implement your own viewlet manager class with the related existing viewlet manager as base class (inheritance)
  • add your own code/message to your viewlet manager
  • use "ZCML overrides" to register your own viewlet manager class as an override for the original viewlet manager