Logo Search packages:      
Sourcecode: zope-archetypes version File versions

def Archetypes::ArchetypeTool::ArchetypeTool::__setstate__ (   self,
  v 
)

Add a callback to track product registrations

Definition at line 830 of file ArchetypeTool.py.

00830                              :
        """Add a callback to track product registrations"""
        ArchetypeTool.inheritedAttribute('__setstate__')(self, v)
        global _types
        global _types_callback
        import sys
        if hasattr(self, '_types'):
            if not hasattr(self, 'last_types_update') or \
                   self.last_types_update.lessThan(last_load):
                for k, t in _types.items():
                    if self._types.has_key(k):
                        update = (t['signature'] !=
                                  self._types[k]['signature'])
                    else:
                        update = 1
                    self._types[k] = {'signature':t['signature'],
                                      'update':update}
                cb = lambda klass, package:self.registerType(klass, package)
                _types_callback.append(cb)
                self.last_types_update = DateTime()


    security.declareProtected(CMFCorePermissions.ManagePortal,
                              'registerType')


Generated by  Doxygen 1.6.0   Back to index