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:
		
							parent
							
								
									cbe2d994c5
								
							
						
					
					
						commit
						c1e94af299
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		|  | @ -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, | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 helmutm
						helmutm