Logo Search packages:      
Sourcecode: zope-cpsskins version File versions  Download package

def CPSSkins::PortalThemesTool::PortalThemesTool::delObject (   self,
  object = None 
)

Deletes an object 

Definition at line 911 of file PortalThemesTool.py.

00911                                     :
        """ Deletes an object """

        if object is None:
            return

        container = aq_parent(aq_inner(object))
        theme_container = self.getPortalThemeRoot(object)

        # the object is a style
        # remove the references
        if getattr(aq_base(object), 'isportalstyle', 0):
            object.findParents(newtitle='')

        mtool = getToolByName(self, 'portal_membership')
        if not mtool.checkPermission(ManageThemes, container):
            raise Unauthorized
        container.manage_delObjects(object.getId())

        theme_container.expireCSSCache()
        theme_container.expireJSCache()

    security.declareProtected(ManageThemes, 'addPortalTheme')
    def addPortalTheme(self, empty=0, **kw):


Generated by  Doxygen 1.6.0   Back to index