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

def zope-linguaplone-0.7::I18NBaseObject::I18NBaseObject::setCanonical (   self  ) 

Sets the canonical attribute

Definition at line 160 of file I18NBaseObject.py.

00160                           :
        """Sets the canonical attribute"""
        # This requires changing references
        if not self.isCanonical():
            translations = self.getTranslations()
            # deleteReferences deletes all references
            # so we iterate twice to make sure we don't
            # delete new and updated references.
            for obj,wfstate in translations.values():
                obj.deleteReferences(RELATIONSHIP)
            for obj,wfstate in translations.values():
                if obj != self:
                    obj.addReference(self, RELATIONSHIP)
            self.invalidateTranslationCache()

    security.declareProtected(View, 'getCanonicalLanguage')
    def getCanonicalLanguage(self):


Generated by  Doxygen 1.6.0   Back to index