source: products/quintagroup.plonegooglesitemaps/branches/sitemap_date/quintagroup/plonegooglesitemaps/events.py @ 3565

Last change on this file since 3565 was 3498, checked in by potar, 7 years ago

fixed pep8

  • Property svn:eol-style set to native
File size: 945 bytes
Line 
1try:
2    from Products.DCWorkflow.events import AfterTransitionEvent
3    AfterTransitionEvent()
4except ImportError:
5    # Copy AfterTransitionEvent from Plone-3/Products.DCWorkflow.events
6    from zope.interface import implements
7    from zope.app.event.objectevent import ObjectEvent
8    from quintagroup.plonegooglesitemaps.interfaces import ITransitionEvent, \
9        IAfterTransitionEvent
10
11    class TransitionEvent(ObjectEvent):
12        implements(ITransitionEvent)
13
14        def __init__(self, obj, workflow, old_state, new_state, transition,
15                     status, kwargs):
16            ObjectEvent.__init__(self, obj)
17            self.workflow = workflow
18            self.old_state = old_state
19            self.new_state = new_state
20            self.transition = transition
21            self.status = status
22            self.kwargs = kwargs
23
24    class AfterTransitionEvent(TransitionEvent):
25        implements(IAfterTransitionEvent)
Note: See TracBrowser for help on using the repository browser.