Back to index

plone3  3.1.7
Public Member Functions | Static Private Attributes
CMFEditions.StandardModifiers.SillyDemoRetrieveModifier Class Reference

List of all members.

Public Member Functions

def beforeSaveModifier
def afterRetrieveModifier

Static Private Attributes

tuple __implements__ = (ISaveRetrieveModifier, )

Detailed Description

Silly Retrieve Modifier for Demos

Disabled by default and if enabled only effective if the 
username is ``gregweb``.

This is really just as silly example though for demo purposes!!!

Definition at line 675 of file StandardModifiers.py.


Member Function Documentation

def CMFEditions.StandardModifiers.SillyDemoRetrieveModifier.afterRetrieveModifier (   self,
  obj,
  repo_clone,
  preserve = () 
)

Definition at line 689 of file StandardModifiers.py.

00689 
00690     def afterRetrieveModifier(self, obj, repo_clone, preserve=()):
00691         from AccessControl import getSecurityManager
00692         if getSecurityManager().getUser().getUserName() != "gregweb":
00693             return [], [], {}
00694 
00695         if repo_clone.portal_type != "Document":
00696             return [], [], {}
00697 
00698         # sorry: hack
00699         clone = repo_clone.__of__(obj.aq_inner.aq_parent)
00700 
00701         # replace all occurences of DeMo with Demo and deMo with demo
00702         text = clone.EditableBody()
00703         text = text.replace("DeMo", "Demo").replace("deMo", "demo")
00704         clone.setText(text)
00705 
00706         return [], [], {}
00707 
00708 InitializeClass(SillyDemoRetrieveModifier)
00709 

Here is the call graph for this function:

Definition at line 686 of file StandardModifiers.py.

00686 
00687     def beforeSaveModifier(self, obj, clone):
00688         return {}, [], []


Member Data Documentation

tuple CMFEditions.StandardModifiers.SillyDemoRetrieveModifier.__implements__ = (ISaveRetrieveModifier, ) [static, private]

Definition at line 684 of file StandardModifiers.py.


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