def contentHandler(ob, ev): ct = IContentType(ob, None) if IPortalType.providedBy(ct) and not IDraftedContent.providedBy(ob): try: ContentTag.update(ob) except TypeError: pass
def isAvailable(self): context = self.context if IPortalType.providedBy(context) or ISite.providedBy(context): annotation = IAnnotations(context, None) if annotation is not None: return True return False
def isAvailable(self): ct = IContentType(self.context, None) if ct is None: return False if "__all__" in self.contentType: if IPortalType.providedBy(ct): return True else: return False elif ct.name in self.contentType: return True return False