コード例 #1
0
def ComponentRegistrationRemoveSubscriber(componentRegistration, event):
    """Receive notification of remove event."""
    component = componentRegistration.component
    try:
        dependents = IDependable(component)
    except TypeError:
        return
    objectpath = zapi.getPath(componentRegistration)
    dependents.removeDependent(objectpath)
コード例 #2
0
 def __call__(self):
     contact = IContact(self.object)
     dependable = IDependable(contact)
     dependable.removeDependent("")
     notify(ObjectRemovedEvent(contact, contact.__parent__, contact.__name__))
コード例 #3
0
ファイル: basicperson.py プロジェクト: l1ph0x/schooltool-2
 def __call__(self):
     contact = IContact(self.object)
     dependable = IDependable(contact)
     dependable.removeDependent("")
     notify(
         ObjectRemovedEvent(contact, contact.__parent__, contact.__name__))