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

def Archetypes::ArchetypeTool::ArchetypeTool::registerType (   self,
  klass,
  package 
)

This gets called every time registerType is called as soon as the
hook is installed by setstate

Definition at line 854 of file ArchetypeTool.py.

00854                                           :
        """This gets called every time registerType is called as soon as the
        hook is installed by setstate"""
        # See if the schema has changed.  If it has, flag it
        update = 0
        sig = klass.schema.signature()
        key = "%s.%s" % (package, klass.meta_type)
        old_data = self._types.get(key, None)
        if old_data:
            update = old_data.get('update', 0)
            old_sig = old_data.get('signature', None)
            if sig != old_sig:
                update = 1
        self._types[key] = {'signature':sig, 'update':update}
        self._p_changed = 1


    # Catalog management
    security.declareProtected(CMFCorePermissions.View,
                              'listCatalogs')


Generated by  Doxygen 1.6.0   Back to index