Back to index

plone3  3.1.7
Classes | Functions | Variables
CMFCore.ActionInformation Namespace Reference

Classes

class  ActionCategory
class  Action
class  ActionInfo
class  ActionInformation
class  oai

Functions

def getOAI

Variables

list _unchanged = []

Function Documentation

def CMFCore.ActionInformation.getOAI (   context,
  object = None 
)

Definition at line 467 of file ActionInformation.py.

00467 
00468 def getOAI(context, object=None):
00469     request = getattr(context, 'REQUEST', None)
00470     if request:
00471         cache = request.get('_oai_cache', None)
00472         if cache is None:
00473             request['_oai_cache'] = cache = {}
00474         info = cache.get( id(object), None )
00475     else:
00476         info = None
00477     if info is None:
00478         if object is None or not hasattr(object, 'aq_base'):
00479             folder = None
00480         else:
00481             folder = object
00482             # Search up the containment hierarchy until we find an
00483             # object that claims it's a folder.
00484             while folder is not None:
00485                 if getattr(aq_base(folder), 'isPrincipiaFolderish', 0):
00486                     # found it.
00487                     break
00488                 else:
00489                     folder = aq_parent(aq_inner(folder))
00490         info = oai(context, folder, object)
00491         if request:
00492             cache[ id(object) ] = info
00493     return info
00494 

Here is the caller graph for this function:


Variable Documentation

Definition at line 39 of file ActionInformation.py.