provide getParentRelations() method as common access method for resources and concepts

git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@2533 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
helmutm 2008-04-20 11:12:55 +00:00
parent cbe2d994c5
commit c1e94af299

View file

@ -202,6 +202,9 @@ class Resource(Image, Contained):
if canListObject(r.first, noSecurityCheck)) if canListObject(r.first, noSecurityCheck))
return sorted(rels, key=sort) return sorted(rels, key=sort)
# simplify common access for concepts and resources:
getParentRelations = getConceptRelations
def getConcepts(self, predicates=None, noSecurityCheck=False): def getConcepts(self, predicates=None, noSecurityCheck=False):
obj = getMaster(self) obj = getMaster(self)
return [r.first for r in obj.getConceptRelations(predicates, return [r.first for r in obj.getConceptRelations(predicates,