Back to index

plone3  3.1.7
Classes | Functions | Variables
Archetypes.Schema.Facade Namespace Reference

Classes

class  CMFMetadataFieldsDescriptor
class  CMFMetadataFieldNamesDescriptor
class  FacadeMetadataSchema

Functions

def getFactory
def fieldsFromSet
def fieldNamesFromSet

Variables

 __metaclass__ = type
dictionary _field_mapping

Function Documentation

def Archetypes.Schema.Facade.fieldNamesFromSet (   set,
  schema 
)

Definition at line 58 of file Facade.py.

00058 
00059 def fieldNamesFromSet(set, schema):
00060     fields = []
00061     for element in set.getElements():
00062         name = '%s%s' % (set.id, element.id)
00063         fields.append(name)
00064     return fields

Here is the caller graph for this function:

def Archetypes.Schema.Facade.fieldsFromSet (   set,
  schema 
)

Definition at line 41 of file Facade.py.

00041 
00042 def fieldsFromSet(set, schema):
00043     fields = {}
00044     for element in set.getElements():
00045         factory = getFactory(element.field_type)
00046         name = '%s%s' % (set.id, element.id)
00047         field = factory(name,
00048                         metadata_name=element.id,
00049                         storage=schema.storage,
00050                         schemata=schema.schemata,
00051                         default=element.getDefault(schema.context),
00052                         required=element.isRequired(),
00053                         isMetadata=schema.isMetadata)
00054         field.widget.label = element.title_or_id()
00055         field.widget.description = element.Description()
00056         fields[name] = field
00057     return fields

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 38 of file Facade.py.

00038 
00039 def getFactory(name):
00040     return _field_mapping.get(name)

Here is the caller graph for this function:


Variable Documentation

Definition at line 1 of file Facade.py.

Initial value:
00001 {'CheckBoxField':BooleanField,
00002                   'DateTimeField':DateTimeField,
00003                   'EmailField':StringField,
00004                   'FileField':FileField,
00005                   'FloatField':FloatField,
00006                   'IntegerField':IntegerField,
00007                   'LinesField':LinesField,
00008                   'LinkField':StringField,
00009                   'ListField':LinesField,
00010                   'ListTextAreaField':LinesField,
00011                   'MethodField':StringField,
00012                   'MultiCheckBoxField':LinesField,
00013                   'MultiListField':LinesField,
00014                   'PasswordField':StringField,
00015                   'PatternField':StringField,
00016                   'RadioField':StringField,
00017                   'RangedIntegerField':StringField,
00018                   'RawTextAreaField':StringField,
00019                   'StringField':StringField,
00020                   'TALESField':StringField,
00021                   'TextAreaField':StringField}

Definition at line 16 of file Facade.py.