Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
CMFPlone.browser.portlets.events.EventsPortlet Class Reference
Inheritance diagram for CMFPlone.browser.portlets.events.EventsPortlet:
Inheritance graph
[legend]
Collaboration diagram for CMFPlone.browser.portlets.events.EventsPortlet:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def published_events
def all_events_link
def prev_events_link

Public Attributes

 portal_url
 portal
 eventsFolder

Detailed Description

Definition at line 11 of file events.py.


Constructor & Destructor Documentation

def CMFPlone.browser.portlets.events.EventsPortlet.__init__ (   self,
  context,
  request,
  args,
  kw 
)

Definition at line 14 of file events.py.

00014 
00015     def __init__(self, context, request, *args, **kw):
00016         super(EventsPortlet, self).__init__(context, request, *args, **kw)
00017         utool = getToolByName(context, 'portal_url')
00018         self.portal_url = utool()
00019         # this has a messed up context, but we don't care in this case
00020         self.portal = utool.getPortalObject()
00021         self.eventsFolder = 'events' in self.portal.objectIds()

Here is the call graph for this function:


Member Function Documentation

Definition at line 33 of file events.py.

00033 
00034     def all_events_link(self):
00035         if self.eventsFolder:
00036             return '%s/events' % self.portal_url
00037         else:
00038             return '%s/events_listing' % self.portal_url

Definition at line 39 of file events.py.

00039 
00040     def prev_events_link(self):
00041         if self.eventsFolder and 'previous' in self.portal.events.objectIds():
00042             return '%s/events/previous' % self.portal_url
00043         else:
00044             return None
00045 
zope.deprecation.deprecated(

Definition at line 22 of file events.py.

00022 
00023     def published_events(self):
00024         context = aq_inner(self.context)
00025         portal_catalog = getToolByName(context, 'portal_catalog')
00026 
00027         return portal_catalog.searchResults(portal_type='Event',
00028                                             end={'query': DateTime(),
00029                                                  'range': 'min'},
00030                                             sort_on='start',
00031                                             sort_limit=5,
00032                                             review_state='published')[:5]

Here is the call graph for this function:


Member Data Documentation

Definition at line 20 of file events.py.

Definition at line 19 of file events.py.

Definition at line 17 of file events.py.


The documentation for this class was generated from the following file: