Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes
CMFCore.interfaces._tools.ITypesTool Class Reference
Inheritance diagram for CMFCore.interfaces._tools.ITypesTool:
Inheritance graph
[legend]
Collaboration diagram for CMFCore.interfaces._tools.ITypesTool:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def getTypeInfo
def listTypeInfo
def listContentTypes
def constructContent

Static Public Attributes

tuple id

Detailed Description

Register content types for the site.

Definition at line 1420 of file _tools.py.


Member Function Documentation

def CMFCore.interfaces._tools.ITypesTool.constructContent (   contentType,
  container,
  id,
  RESPONSE = None,
  args,
  kw 
)
Build an instance of the appropriate type in 'container'

o 'contentType' is the name of the ITypeInformation to be
  constructed.

o Assign the instance the given 'id', if possible.

o If 'RESPONSE' is passed, redirect to the new object's
  "initial view";  otherwise return the new object's 'id' (which
  may have morphed during construction).

o Raise Unauthorized if the current user is not allowed to construct
  items of the given type in 'container'.

Definition at line 1465 of file _tools.py.

01465 
01466                          *args, **kw):
01467         """ Build an instance of the appropriate type in 'container'
01468 
01469         o 'contentType' is the name of the ITypeInformation to be
01470           constructed.
01471 
01472         o Assign the instance the given 'id', if possible.
01473 
01474         o If 'RESPONSE' is passed, redirect to the new object's
01475           "initial view";  otherwise return the new object's 'id' (which
01476           may have morphed during construction).
01477 
01478         o Raise Unauthorized if the current user is not allowed to construct
01479           items of the given type in 'container'.
01480         """
01481 
01482 
01483 #
01484 #   Undo tool interface
#
Return an ITypeInformation for the given type name / object.

o If 'contentType' is actually an object, rather than a string,
  attempt to look up the appropriate type info using its 'portal_type'.

o Permission:  Public

Definition at line 1432 of file _tools.py.

01432 
01433     def getTypeInfo(contentType):
01434         """ Return an ITypeInformation for the given type name / object.
01435 
01436         o If 'contentType' is actually an object, rather than a string,
01437           attempt to look up the appropriate type info using its 'portal_type'.
01438 
01439         o Permission:  Public
01440         """

Here is the caller graph for this function:

def CMFCore.interfaces._tools.ITypesTool.listContentTypes (   container = None,
  by_metatype = 0 
)
Return a sequence of IDs of ITypeInformations registered
    for the site.

o If 'by_metatype' is True, return meta_types instead (this variant
  is deprecated).

o If 'container' is passed, filter the list according to the user's
  permissions to add content in that place.

o Permission:  Public

Definition at line 1451 of file _tools.py.

01451 
01452     def listContentTypes(container=None, by_metatype=0):
01453         """ Return a sequence of IDs of ITypeInformations registered
01454             for the site.
01455 
01456         o If 'by_metatype' is True, return meta_types instead (this variant
01457           is deprecated).
01458 
01459         o If 'container' is passed, filter the list according to the user's
01460           permissions to add content in that place.
01461 
01462         o Permission:  Public
01463         """

Return a sequence of ITypeInformations registered for the
    site.

o If 'container' is passed, filter the list according to the user's
  permissions to add content in that place.

o Permission:  Public

Definition at line 1441 of file _tools.py.

01441 
01442     def listTypeInfo(container=None):
01443         """ Return a sequence of ITypeInformations registered for the
01444             site.
01445 
01446         o If 'container' is passed, filter the list according to the user's
01447           permissions to add content in that place.
01448 
01449         o Permission:  Public
01450         """

Here is the caller graph for this function:


Member Data Documentation

Initial value:
Attribute('id',
            """ The ID of the tool.o Must be set to "portal_types"""",
            )
Register content types for the site.

Definition at line 1425 of file _tools.py.


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