[CMF-checkins] CVS: CMF/CMFCore - ActionInformation.py:1.1.2.3 Expression.py:1.1.2.2
Andrew Sawyers
andrew@zope.com
Thu, 3 Jan 2002 14:09:29 -0500
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv11908/CMFCore
Modified Files:
Tag: andrew_ttw_actions-branch
ActionInformation.py Expression.py
Log Message:
*Added new method getActionExpression to return the text
attribute of an action.
*Removed kruft from expression context.
*Added start of unit tests
=== CMF/CMFCore/ActionInformation.py 1.1.2.2 => 1.1.2.3 ===
return action
+ security.declarePublic('getActionExpression')
+ def getActionExpression(self):
+ """
+ If not an empty string or None, return the
+ text of the expression otherwise return ''
+ """
+ if self._action:
+ return self._action.text
+ else:
+ return self._action
+
security.declarePublic('getCondition')
def getCondition(self):
"""
- If not an empty string or None, evaluate the expression
+ If not an empty string or None, return the
+ text of the expression otherwise
+ return ''
"""
if self.condition:
return self.condition.text
=== CMF/CMFCore/Expression.py 1.1.2.1 => 1.1.2.2 ===
'portal_url': portal.absolute_url(),
'object': object,
- 'content': object,
'folder': folder,
'portal': portal,
'nothing': None,