Replace "get_utilities_for" by "get_all_utilities_registered_for" to get all registered utilities for a given interface
--- a/src/pyams_content/zmi/viewlet/toplinks/__init__.py Fri Jan 20 15:40:59 2017 +0100
+++ b/src/pyams_content/zmi/viewlet/toplinks/__init__.py Fri Jan 20 15:41:23 2017 +0100
@@ -49,7 +49,7 @@
def update(self):
super(SharedSitesMenu, self).update()
registry = get_local_registry()
- for name, site in registry.getUtilitiesFor(ISharedSite):
+ for site in registry.getAllUtilitiesRegisteredFor(ISharedSite):
menu = TopLinksMenu(self.context, self.request, self.__parent__, self)
menu.label = II18n(site).query_attribute('title', request=self.request) or site.__name__
menu.url = absolute_url(site, self.request, 'admin#dashboard.html')
@@ -67,7 +67,7 @@
def update(self):
super(SharedToolsMenu, self).update()
registry = get_local_registry()
- for name, tool in registry.getUtilitiesFor(ISharedTool):
+ for tool in registry.getAllUtilitiesRegisteredFor(ISharedTool):
if ISharedSite.providedBy(tool):
continue
menu = TopLinksMenu(self.context, self.request, self.__parent__, self)