def getUtilities(self): """Return all utilities that provide this interface.""" # Must remove security and location proxies, so that we have access to # the API methods and class representation. regs = component.getUtilities(removeAllProxies(self.context)) return [component.getUtilityInfoDictionary(reg) for reg in regs]
def getComponent(self): """Return the python path of the implementation class.""" # Remove proxy here, so that we can determine the type correctly naked = removeSecurityProxy(self.context.registration) result = getUtilityInfoDictionary(naked) return {'path': result['path'], 'url': result['url']}