def is_event(self, value): if value: enable_behaviors(self.context, EVENT_BEHAVIORS, EVENT_INTERFACES) else: # delete orphaned attributes from disabled behaviors # so that indexers do not index them. self._delattrs(["start", "end", "timezone", "whole_day", "recurrence", "location"]) disable_behaviors(self.context, EVENT_BEHAVIORS, EVENT_INTERFACES)
def is_place(self, value): if value: enable_behaviors(self.context, PLACE_BEHAVIORS, PLACE_INTERFACES) else: disable_behaviors(self.context, PLACE_BEHAVIORS, PLACE_INTERFACES)
def is_thread(self, value): if value: enable_behaviors(self.context, THREAD_BEHAVIORS, THREAD_INTERFACES) else: disable_behaviors(self.context, THREAD_BEHAVIORS, THREAD_INTERFACES)