Commit 1f682f85 authored by Aurel's avatar Aurel

remove method that will always be called on class CMFBTree


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16310 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1b7c5cf5
......@@ -67,35 +67,5 @@ class CMFHBTreeFolder(HBTreeFolder2Base, PortalFolder):
HBTreeFolder2Base._checkId(self, id, allow_dup)
def allowedContentTypes(self):
"""
List type info objects for types which can be added in
this folder.
"""
result = []
portal_types = getToolByName(self, 'portal_types')
myType = portal_types.getTypeInfo(self)
if myType is not None:
allowed_types_to_check = []
if myType.filter_content_types:
for portal_type in myType.allowed_content_types:
contentType = portal_types.getTypeInfo(portal_type)
if contentType is None:
raise AttributeError, "Portal type '%s' does not exist " \
"and should not be allowed in '%s'" % \
(portal_type, self.getPortalType())
result.append(contentType)
else:
for contentType in portal_types.listTypeInfo(self):
if myType.allowType(contentType.getId()):
result.append(contentType)
else:
result = portal_types.listTypeInfo()
return filter(
lambda typ, container=self: typ.isConstructionAllowed(container),
result)
InitializeClass(CMFHBTreeFolder)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment