def __call__(self, context): # laboratories : attribute acquired from parent doctoral college terms = [] parent = get_wellknownparent(context) linesstr = '' if IWellKnown.implementedBy(parent): linesstr = parent.superfield return make_voc(terms, linesstr)
def get_wellknownparent(context): parent = get_parent(context) plone = getSite() while ( parent is not plone and not IWellKnown.implementedBy(parent) and is_zope_object(parent) ): parent = get_parent(parent) return parent