Back to index

plone3  3.1.7
__init__.py
Go to the documentation of this file.
00001 """Initialize CMFFormController"""
00002 
00003 from Products.CMFCore.utils import registerIcon, ToolInit
00004 
00005 from config import *
00006 import ControllerPageTemplate, FSControllerPageTemplate
00007 import ControllerPythonScript, FSControllerPythonScript
00008 import ControllerValidator, FSControllerValidator
00009 import FormController
00010 from Actions import RedirectTo, TraverseTo, RedirectToAction, TraverseToAction
00011 
00012 GLOBALS = globals()
00013 
00014 def initialize(context):
00015     tools = (FormController.FormController,)
00016     ToolInit('Form Controller Tool',
00017              tools=tools,
00018              icon='tool.gif',
00019             ).initialize( context )
00020     context.registerClass(
00021         ControllerPageTemplate.ControllerPageTemplate,
00022         constructors=(ControllerPageTemplate.manage_addControllerPageTemplateForm,
00023                       ControllerPageTemplate.manage_addControllerPageTemplate),
00024         icon='www/cpt.gif',
00025         )
00026     context.registerClass(
00027         ControllerPythonScript.ControllerPythonScript,
00028         constructors=(ControllerPythonScript.manage_addControllerPythonScriptForm,
00029                       ControllerPythonScript.manage_addControllerPythonScript),
00030         icon='www/cpy.gif',
00031         )
00032     context.registerClass(
00033         ControllerValidator.ControllerValidator,
00034         constructors=(ControllerValidator.manage_addControllerValidatorForm,
00035                       ControllerValidator.manage_addControllerValidator),
00036         icon='www/vpy.gif',
00037         )
00038     registerIcon(FSControllerPageTemplate.FSControllerPageTemplate,
00039                  'www/cpt.gif', globals())
00040     registerIcon(FSControllerPythonScript.FSControllerPythonScript,
00041                  'www/cpy.gif', globals())
00042     registerIcon(FSControllerValidator.FSControllerValidator,
00043                  'www/vpy.gif', globals())