def __init__(self, context): # Remove the security proxy so the values from the vocabulary # are the actual interfaces and not proxies. component = removeSecurityProxy(context) interfaces = providedBy(component).flattened() terms = [SimpleTerm(interface, interfaceToName(context, interface)) for interface in interfaces] super(ObjectInterfacesVocabulary, self).__init__(terms)
def _getInterfaceNames(self, interfaces): return [interfaceToName(self, iface) for iface in interfaces]