equal
deleted
inserted
replaced
24 """Interface based context selector |
24 """Interface based context selector |
25 |
25 |
26 This selector can be used as a subscriber predicate to define |
26 This selector can be used as a subscriber predicate to define |
27 an interface that the context must support for the event to be applied:: |
27 an interface that the context must support for the event to be applied:: |
28 |
28 |
|
29 .. code-block:: python |
|
30 |
29 from pyams_utils.interfaces.site import ISiteRoot |
31 from pyams_utils.interfaces.site import ISiteRoot |
30 |
32 |
31 @subscriber(IObjectModifiedEvent, context_selector=ISiteRoot) |
33 @subscriber(IObjectModifiedEvent, context_selector=ISiteRoot) |
32 def siteroot_modified_event_handler(event): |
34 def siteroot_modified_event_handler(event): |
33 '''This is an event handler for an ISiteRoot object modification event''' |
35 '''This is an event handler for an ISiteRoot object modification event''' |