Back to index

plone3  3.1.7
Public Member Functions
Archetypes.fieldproperty.ATReferenceFieldProperty Class Reference
Inheritance diagram for Archetypes.fieldproperty.ATReferenceFieldProperty:
Inheritance graph
[legend]
Collaboration diagram for Archetypes.fieldproperty.ATReferenceFieldProperty:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __get__
def __set__

Detailed Description

A more friendly/use-case-specific name for ATReferenceFieldProperty.

Definition at line 169 of file fieldproperty.py.


Member Function Documentation

def Archetypes.fieldproperty.ATToolDependentFieldProperty.__get__ (   self,
  inst,
  klass 
) [inherited]

Reimplemented from Archetypes.fieldproperty.ATFieldProperty.

Definition at line 150 of file fieldproperty.py.

00150 
00151     def __get__(self, inst, klass):
00152         if inst is None:
00153             return self
00154         field = inst.getField(self._name)
00155         if field is None:
00156             raise KeyError("Cannot find field with name %s" % self._name)
00157         value = field.get(inst.__of__(getSite()))
00158         if self._get_transform is not None:
00159             value = self._get_transform(value)
00160         return value

def Archetypes.fieldproperty.ATToolDependentFieldProperty.__set__ (   self,
  inst,
  value 
) [inherited]

Reimplemented from Archetypes.fieldproperty.ATFieldProperty.

Definition at line 161 of file fieldproperty.py.

00161 
00162     def __set__(self, inst, value):
00163         field = inst.getField(self._name)
00164         if field is None:
00165             raise KeyError("Cannot find field with name %s" % self._name)
00166         if self._set_transform is not None:
00167             value = self._set_transform(value)
00168         field.set(inst.__of__(getSite()), value)
        

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