Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
plone.portlets.retriever.PlacelessPortletRetriever Class Reference
Inheritance diagram for plone.portlets.retriever.PlacelessPortletRetriever:
Inheritance graph
[legend]
Collaboration diagram for plone.portlets.retriever.PlacelessPortletRetriever:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def getPortlets

Public Attributes

 context
 storage

Detailed Description

A placeless portlet retriever.

This will aggregate user portlets, then group portlets.

Definition at line 128 of file retriever.py.


Constructor & Destructor Documentation

def plone.portlets.retriever.PlacelessPortletRetriever.__init__ (   self,
  context,
  storage 
)

Reimplemented from plone.portlets.retriever.PortletRetriever.

Definition at line 137 of file retriever.py.

00137 
00138     def __init__(self, context, storage):
00139         self.context = context
00140         self.storage = storage
        

Here is the caller graph for this function:


Member Function Documentation

Work out which portlets to display, returning a list of dicts
describing assignments to render.

Reimplemented from plone.portlets.retriever.PortletRetriever.

Definition at line 141 of file retriever.py.

00141 
00142     def getPortlets(self):
00143         pcontext = IPortletContext(self.context, None)
00144         if pcontext is None:
00145             return []
00146             
00147         assignments = []
00148         for category, key in pcontext.globalPortletCategories(True):
00149             mapping = self.storage.get(category, None)
00150             if mapping is not None:
00151                 for assignment in mapping.get(key, {}).values():
00152                     assignments.append({'category'    : category,
00153                                         'key'         : key,
00154                                         'name'        : assignment.__name__,
00155                                         'assignment'  : assignment
00156                                         })
00157     
        return assignments

Here is the call graph for this function:


Member Data Documentation

Reimplemented from plone.portlets.retriever.PortletRetriever.

Definition at line 138 of file retriever.py.

Reimplemented from plone.portlets.retriever.PortletRetriever.

Definition at line 139 of file retriever.py.


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