Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes | Private Attributes | Static Private Attributes
CMFEditions.Modifiers.ConditionalModifier Class Reference
Inheritance diagram for CMFEditions.Modifiers.ConditionalModifier:
Inheritance graph
[legend]
Collaboration diagram for CMFEditions.Modifiers.ConditionalModifier:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def edit
def isApplicable
def isEnabled
def getModifier

Public Attributes

 id
 title
 meta_type

Static Public Attributes

tuple modifierEditForm
 manage = manage_mainmodifierEditForm
tuple manage_options = ({'label' : 'Edit', 'action' : 'modifierEditForm'},)

Private Attributes

 _modifier
 _enabled

Static Private Attributes

tuple __implements__

Detailed Description

This is a wrapper for a modifier.

Definition at line 44 of file Modifiers.py.


Constructor & Destructor Documentation

def CMFEditions.Modifiers.ConditionalModifier.__init__ (   self,
  id,
  modifier,
  title = '' 
)
See IConditionalModifier.

Reimplemented in CMFEditions.Modifiers.ConditionalTalesModifier.

Definition at line 59 of file Modifiers.py.

00059 
00060     def __init__(self, id, modifier, title=''):
00061         """See IConditionalModifier.
00062         """
00063         self.id = str(id)
00064         self.title = str(title)
00065         self.meta_type = 'edmod_%s' % id
00066         self._modifier = modifier
00067         self._enabled = False


Member Function Documentation

def CMFEditions.Modifiers.ConditionalModifier.edit (   self,
  enabled = None,
  title = '',
  REQUEST = None 
)
See IConditionalModifier.

Definition at line 68 of file Modifiers.py.

00068 
00069     def edit(self, enabled=None, title='', REQUEST=None):
00070         """See IConditionalModifier.
00071         """
00072         self.title = title
00073 
00074         if enabled is not None and (enabled=='True' or enabled==True):
00075             self._enabled = enabled
00076         else:
00077             self._enabled = False
00078 
00079         if REQUEST:
00080             REQUEST.set("manage_tabs_message", "Changed")
00081             return self.modifierEditForm(self, REQUEST)

Here is the caller graph for this function:

See IConditionalModifier.

Definition at line 94 of file Modifiers.py.

00094 
00095     def getModifier(self):
00096         """See IConditionalModifier.
00097         """
00098         return self._modifier
00099 
00100 InitializeClass(ConditionalModifier)
00101 

def CMFEditions.Modifiers.ConditionalModifier.isApplicable (   self,
  obj,
  portal = None 
)
See IConditionalModifier.

Reimplemented in CMFEditions.Modifiers.ConditionalTalesModifier.

Definition at line 82 of file Modifiers.py.

00082 
00083     def isApplicable(self, obj, portal=None):
00084         """See IConditionalModifier.
00085         """
00086         # check if disabled or an empty condition
00087         if self._enabled:
00088             return True

See IConditionalModifier.

Definition at line 89 of file Modifiers.py.

00089 
00090     def isEnabled(self):
00091         """See IConditionalModifier.
00092         """
00093         return self._enabled


Member Data Documentation

Initial value:
(
        IConditionalModifier,
    )

Reimplemented in CMFEditions.Modifiers.ConditionalTalesModifier.

Definition at line 48 of file Modifiers.py.

Definition at line 66 of file Modifiers.py.

Definition at line 65 of file Modifiers.py.

Definition at line 62 of file Modifiers.py.

CMFEditions.Modifiers.ConditionalModifier.manage = manage_mainmodifierEditForm [static]

Definition at line 56 of file Modifiers.py.

tuple CMFEditions.Modifiers.ConditionalModifier.manage_options = ({'label' : 'Edit', 'action' : 'modifierEditForm'},) [static]

Reimplemented in CMFEditions.Modifiers.ConditionalTalesModifier.

Definition at line 57 of file Modifiers.py.

Definition at line 64 of file Modifiers.py.

Initial value:
PageTemplateFile('www/modifierEditForm.pt',
                                        globals(),
                                        __name__='modifierEditForm')

Reimplemented in CMFEditions.Modifiers.ConditionalTalesModifier.

Definition at line 52 of file Modifiers.py.

Definition at line 63 of file Modifiers.py.


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