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

def CMFMember::tools::memberdatacontainer::MemberDataContainer::allowedContentTypes (   self  ) 

Folderish Methods.

List type info objects for types which can be added in
this folder.  Override the default in PortalFolder to make
sure that all allowed member types are included in case the
allowed types and the allowed member types are not in sync.

Definition at line 468 of file memberdatacontainer.py.

00468                                  :
        """
        List type info objects for types which can be added in
        this folder.  Override the default in PortalFolder to make
        sure that all allowed member types are included in case the
        allowed types and the allowed member types are not in sync.
        """
        portal_types = getToolByName(self, 'portal_types')
        myType = portal_types.getTypeInfo(self)

        if myType is not None:
            result = {}
            for contentType in portal_types.listTypeInfo(self):
                typeId = contentType.getId()
                if myType.allowType( typeId ):
                    result[typeId] = contentType
                    
            for contentType in self.getAllowedMemberTypes():
                if not result.has_key(contentType):
                    result[contentType] = portal_types.getTypeInfo(contentType)
            result = result.values()
        else:
            result = portal_types.listTypeInfo()

        return filter( lambda typ, container=self:
                         typ and typ.isConstructionAllowed( container )
                       , result )

    security.declareProtected(CMFCorePermissions.ManagePortal, 'getAvailableMemberTypes')
    def getAvailableMemberTypes(self):


Generated by  Doxygen 1.6.0   Back to index