def isConvergedContent(self, content): """ See that the content is proper converged supported """ if not IConvergenceSupport.providedBy(content): return False try: behavior = IMultiChannelBehavior(content) except TypeError: return False return behavior != None
def solveContentMedia(self, content): """ Acquire media platforms value for the particular content object. Walk thorugh parent object chain until we have found meaningful value are we mobile or not. """ # TODO: We don't trust Zope acquisition, # walk tree upwards until we have a value while content != None: if not IConvergenceSupport.providedBy(content): break val = self.getContentMedia(content) if val != ContentMediaOption.USE_PARENT: return val content = content.aq_parent # Not defined, return both return ContentMediaOption.BOTH