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

def CMFMember::tools::memberdatacontainer::MemberDataContainer::setAllowedMemberTypes (   self,
  memberTypes,
  kwargs 
)

Overriding default mutator since TypesTool checks the
variable allowed_content_types directly.  No checking
for whether types are real, proper, etc.

Definition at line 679 of file memberdatacontainer.py.

00679                                                           :
        """
        Overriding default mutator since TypesTool checks the
        variable allowed_content_types directly.  No checking
        for whether types are real, proper, etc.
        """
        memberTypes = filter(None, memberTypes)
        
        field=self.getField('allowedMemberTypes')
        field.set(self, memberTypes, **kwargs)

        allowedMemberTypes = getToolByName(self,
                                           'cmfmember_control').getMemberKlasses()

        allowed_content_types = [ item for item in memberTypes \
                                  if allowedMemberTypes.has_key(item) ]

        if USE_SCHEMA_EDITOR:
            for act in allowed_content_types:
                self.atse_registerObject(allowedMemberTypes[act],
                                         domain='plone')

        type_tool = getToolByName(self, 'portal_types')
        type_tool.MemberDataContainer.allowed_content_types = \
                                                tuple(allowed_content_types)
        self.allowed_content_types = allowed_content_types


# Put this outside the MemberData tool so that it can be used for
# conversion of old MemberData during installation
def getMemberFactory(self, type_name):


Generated by  Doxygen 1.6.0   Back to index