[Zope3-checkins] CVS: Zope3/src/zope/app/presentation - presentation.py:1.14

Jim Fulton jim at zope.com
Fri Apr 9 07:36:43 EDT 2004


Update of /cvs-repository/Zope3/src/zope/app/presentation
In directory cvs.zope.org:/tmp/cvs-serv12965/src/zope/app/presentation

Modified Files:
	presentation.py 
Log Message:
Implemented the registrations method for the presentation services.


=== Zope3/src/zope/app/presentation/presentation.py 1.13 => 1.14 ===
--- Zope3/src/zope/app/presentation/presentation.py:1.13	Wed Mar 31 18:26:23 2004
+++ Zope3/src/zope/app/presentation/presentation.py	Fri Apr  9 07:36:13 2004
@@ -50,6 +50,7 @@
 
     zope.interface.implements(
         zope.component.interfaces.IPresentationService,
+        zope.component.interfaces.IComponentRegistry,
         zope.app.site.interfaces.ISimpleService,
         zope.app.registration.interfaces.IRegistry,
         zope.app.interface.interfaces.IInterfaceBasedRegistry,
@@ -210,6 +211,18 @@
             self.layers[layername] = layer
             
         return layer.createRegistrationsFor(registration)
+
+    def registrations(self):
+        for layer in self.layers.itervalues():
+            for registration in layer.registrations():
+                yield registration
+
+        next = self.next
+        if next is None:
+            next = self.base
+
+        for registration in next.registrations():
+            yield registration
 
     def getRegistrationsForInterface(self, required):
         # XXX relying on global service for layer definitions




More information about the Zope3-Checkins mailing list