[CMF-checkins] CVS: CMF/CMFCore - DynamicType.py:1.21

Yvo Schubbe y.2004_ at wcm-solutions.de
Thu Feb 5 09:34:02 EST 2004


Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv23466/CMFCore

Modified Files:
	DynamicType.py 
Log Message:
- added getActionInfo to DynamicType


=== CMF/CMFCore/DynamicType.py 1.20 => 1.21 ===
--- CMF/CMFCore/DynamicType.py:1.20	Thu Nov  6 07:10:01 2003
+++ CMF/CMFCore/DynamicType.py	Thu Feb  5 09:33:31 2004
@@ -58,13 +58,24 @@
 
     security.declarePublic('getTypeInfo')
     def getTypeInfo(self):
-        '''
-        Returns an object that supports the ContentTypeInformation interface.
-        '''
+        """ Get the TypeInformation object specified by the portal type.
+        """
         tool = getToolByName(self, 'portal_types', None)
         if tool is None:
             return None
         return tool.getTypeInfo(self)  # Can return None.
+
+    security.declarePublic('getActionInfo')
+    def getActionInfo(self, action_chain, check_visibility=0,
+                      check_condition=0):
+        """ Get an Action info mapping specified by a chain of actions.
+        """
+        ti = self.getTypeInfo()
+        if ti:
+            return ti.getActionInfo(action_chain, self, check_visibility,
+                                    check_condition)
+        else:
+            raise ValueError('No Action meets the given specification.')
 
     # Support for dynamic icons
 




More information about the CMF-checkins mailing list