Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes | Static Private Attributes
CMFCore.utils.ContentInit Class Reference
Collaboration diagram for CMFCore.utils.ContentInit:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def initialize

Public Attributes

 meta_type
 content_types
 permission
 extra_constructors

Static Public Attributes

tuple security = ClassSecurityInfo()

Static Private Attributes

string __name__ = 'contentinit'

Detailed Description

Utility class for generating factories for several content types.

Definition at line 620 of file utils.py.


Constructor & Destructor Documentation

def CMFCore.utils.ContentInit.__init__ (   self,
  meta_type,
  content_types,
  permission = None,
  extra_constructors = (),
  fti = () 
)

Definition at line 635 of file utils.py.

00635 
00636                 ):
00637         # BBB: fti argument is ignored
00638         self.meta_type = meta_type
00639         self.content_types = content_types
00640         self.permission = permission
00641         self.extra_constructors = extra_constructors


Member Function Documentation

def CMFCore.utils.ContentInit.initialize (   self,
  context 
)

Definition at line 642 of file utils.py.

00642 
00643     def initialize(self, context):
00644         # Add only one meta type to the folder add list.
00645         context.registerClass(
00646             meta_type = self.meta_type
00647             # This is a little sneaky: we add self to the
00648             # FactoryDispatcher under the name "contentinit".
00649             # manage_addContentType() can then grab it.
00650             , constructors = ( manage_addContentForm
00651                                , manage_addContent
00652                                , self ) + self.extra_constructors
00653             , permission = self.permission
00654             )
00655 
00656         for ct in self.content_types:
00657             ct.__factory_meta_type__ = self.meta_type
00658 
00659 InitializeClass( ContentInit )


Member Data Documentation

string CMFCore.utils.ContentInit.__name__ = 'contentinit' [static, private]

Definition at line 624 of file utils.py.

Definition at line 638 of file utils.py.

Definition at line 640 of file utils.py.

Definition at line 637 of file utils.py.

Definition at line 639 of file utils.py.

tuple CMFCore.utils.ContentInit.security = ClassSecurityInfo() [static]

Definition at line 626 of file utils.py.


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