Back to index

plone3  3.1.7
Public Member Functions
plone.app.customerize.browser.RegistrationsView Class Reference
Inheritance diagram for plone.app.customerize.browser.RegistrationsView:
Inheritance graph
[legend]
Collaboration diagram for plone.app.customerize.browser.RegistrationsView:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def getTemplateViewRegistrations
def getTemplateCodeFromRegistration
def getTemplateViewRegistrationInfo
def getRegistrationFromRequest
def registerTTWView
def customizeTemplate
def getLocalRegistrations

Detailed Description

Definition at line 11 of file browser.py.


Member Function Documentation

Definition at line 46 of file browser.py.

00046 
00047     def customizeTemplate(self):
00048         reg = self.getRegistrationFromRequest()
00049         viewzpt = registration.customizeTemplate(reg)
00050         self.registerTTWView(viewzpt, reg)
00051         path = aq_inner(viewzpt).getPhysicalPath()
00052         url = self.request.physicalPathToURL(path) + "/manage_workspace"
00053         self.request.response.redirect(url)

Here is the call graph for this function:

Definition at line 54 of file browser.py.

00054 
00055     def getLocalRegistrations(self):
00056         layers = getAllUtilitiesRegisteredFor(ILocalBrowserLayerType)
00057         components = getSiteManager(self.context)
00058         for reg in components.registeredAdapters():
00059             if (len(reg.required) in (2, 4, 5) and
00060                    (reg.required[1].isOrExtends(IBrowserRequest) or
00061                     reg.required[1] in layers) and
00062                     ITTWViewTemplate.providedBy(reg.factory)):
00063                 yield reg
00064 

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 36 of file browser.py.

00036 
00037     def getRegistrationFromRequest(self):
00038         form = self.context.request.form
00039         return registration.findTemplateViewRegistration(form['required'],
00040             form['view_name'])

Here is the caller graph for this function:

Definition at line 28 of file browser.py.

00028 
00029     def getTemplateCodeFromRegistration(self):
00030         reg = self.getRegistrationFromRequest()
00031         return registration.getTemplateCodeFromRegistration(reg)

Here is the call graph for this function:

Definition at line 32 of file browser.py.

00032 
00033     def getTemplateViewRegistrationInfo(self):
00034         reg = self.getRegistrationFromRequest()
00035         return list(registration.templateViewRegistrationInfos([reg]))[0]

Here is the call graph for this function:

get all global view registrations and cycle through the local
    ones to see which views have already been customized ttw 

Definition at line 13 of file browser.py.

00013 
00014     def getTemplateViewRegistrations(self):
00015         """ get all global view registrations and cycle through the local
00016             ones to see which views have already been customized ttw """
00017         regs = []
00018         local = {}
00019         for reg in self.getLocalRegistrations():
00020             local[(reg.required, str(reg.name), str(reg.factory.name))] = reg
00021         for reg in registration.templateViewRegistrations():
00022             lreg = local.get((reg.required, str(reg.name), str(reg.ptname)), None)
00023             if lreg is not None:
00024                 regs.append(lreg)
00025             else:
00026                 regs.append(reg)
00027         return registration.templateViewRegistrationGroups(regs)  

Here is the call graph for this function:

Definition at line 41 of file browser.py.

00041 
00042     def registerTTWView(self, viewzpt, reg):
00043         sm = getSiteManager(self.context)
00044         sm.registerAdapter(viewzpt, required = reg.required,
00045                            provided = reg.provided, name = reg.name)

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following file: