Inherits PntObject.
Inherited by PntDbObjectTemplate.
Public Member Functions | |
__construct ($id=0) | |
initPropertyDescriptors () | |
addDbFieldProps ($includeList=null, $tableName=null) | |
getLabel () | |
getLabelSeparator () | |
& | initFromData ($assocArray, &$fieldMap) |
initMissingFields (&$missingFieldsMap) | |
save () | |
isNew () | |
getSaveErrorMessages () | |
checkValueInOptions ($prop, &$errs) | |
getValueNoOptionErrorMessage ($prop, $value) | |
getValueWithIdNoOptionErrorMessage ($prop, $id) | |
getPropsForCheckOptions () | |
delete () | |
recurseDelete () | |
recurseCopyFrom ($original, $fromProp=null) | |
getPropsForRecurseCopy ($fromProp=null) | |
copyValuesOf ($prop, $values) | |
copyFrom ($original, $fromProp=null) | |
registerCopyFrom ($original) | |
addVerifyOnDeleteValues (&$result, $exclude=array()) | |
pntDelete () | |
getDeleteErrorMessages ($cascading=array()) | |
getOnDeleteProps ($cascading) | |
getOnDeleteErrorMessage ($prop, $values) | |
loadData ($id) | |
Public Member Functions inherited from PntObject | |
__construct () | |
copy () | |
getClass () | |
getClassDescriptor () | |
initPropertyDescriptors () | |
getOid () | |
addFieldProp ($name, $type, $readOnly=false, $minValue=null, $maxValue=null, $minLength=0, $maxLength=null, $classDir=null, $persistent=true) | |
addDerivedProp ($name, $type, $readOnly=true, $minValue=null, $maxValue=null, $minLength=0, $maxLength=null, $classDir=null) | |
addMultiValueProp ($name, $type, $readOnly=true, $minValue=null, $maxValue=null, $minLength=0, $maxLength=null, $classDir=null) | |
getPropertyDescriptor ($propertyName) | |
get ($propertyName, $filter=true) | |
set ($propertyName, $value) | |
getOptions ($name, $filter=true) | |
getValueValidator ($prop) | |
validateGetErrorString ($prop, $value, $validateReadOnly=true) | |
basicGetLabel () | |
getLabel () | |
__toString () | |
release () | |
getEditInfo () | |
toString () | |
_getValueValidator ($prop) | |
Static Public Member Functions | |
static | isPersistent () |
static | getClassDescriptorClass () |
static | getTableName () |
static | getFilters ($className, $depth) |
static | getLabelSort ($subclass) |
static | newQueryHandler () |
Static Public Member Functions inherited from PntObject | |
static | isPersistent () |
static | getClassDescriptorClass () |
static | getClassDir () |
static | getClassLabel () |
static | getUiColumnPaths () |
static | getReportColumnPaths () |
static | getUiFieldPaths ($clsDes) |
static | newNavigation ($key, $itemType) |
Data Fields | |
$id = 0 | |
__construct | ( | $id = 0 | ) |
Constructor Constuctors can not decide what class to instatiate. If subclass has to instanciated depending on the data loaded, implement it in a subclass of PntDbClassDescriptor Therefore this constructor should not be called from framework
addDbFieldProps | ( | $includeList = null , |
|
$tableName = null |
|||
) |
Adds fieldProperties for the columns from the database. This method assumes column names to be equal to the names of their corresponding field properties.
array | $includeList | names of properties to include If omitted, all columns will be used in the order they appear in the table, but if a fieldProperty is already defined it is left untouched. |
String | $tableName | the name of the table whose columns to use. If omitted, the result of $this->getClassDescriptor()->getTableName() is used |
addVerifyOnDeleteValues | ( | & | $result, |
$exclude = array() |
|||
) |
Add the objects the delete will cascade to
array | &$result | to add the objects to $this->getDeleteErrorMessages must have been called. |
PntError |
checkValueInOptions | ( | $prop, | |
& | $errs | ||
) |
Check a property value to be in the options of the property.
PntPropertyDescriptor | $prop | |
&array | $errs add eventual error message strings to this array |
PntError |
copyFrom | ( | $original, | |
$fromProp = null |
|||
) |
Save this as a new peanut. Assumes this is already cloned and modified. Copy values of multi value properties that are inCopy recursively. Do not copy values of other properties. Saving is done using the basic function pntSacve. If you need to do aditional work that ::save normally does, you need to override this method.
PntDbObject | $original | whose multi value properties values may be copied |
PntPropertyDescriptor | $fromProp | the property recursing from |
copyValuesOf | ( | $prop, | |
$values | |||
) |
Copy the values for the property
PntMultiValuePropertyDescriptor | $prop | that will hold the values |
array | of PntObejct $values to be copied |
delete | ( | ) |
Delete the records of this object from the database. As of version 2.0.alpha the delete recurses to the values of multi value properties whose onDelete is 'd' or 'v'
|
static |
getDeleteErrorMessages | ( | $cascading = array() | ) |
This method is called by ObjectDeleteAction before delete() is called. If the result of this method is not empty, delete() is not called and the error messages are set to the page forwarded to. As of version 2.0.alpha this method adds error messages for multi value properties onDelete = 'c' and recurses for multi value properties onDelete is set
array | of PntObjects $cascading from which the caller is cascading by the paths from each |
PntErorr |
|
static |
$className | name of the subclass - static will be inherited and will not know the name of the class it is called on :-( |
getLabel | ( | ) |
String representation for representation in UI
getLabelSeparator | ( | ) |
|
static |
Default implementation - returns sort by defaultLabelProp taken from persistent props
string | $itemType | itemType for the sort (may be the sort will be for a subclass) |
getOnDeleteErrorMessage | ( | $prop, | |
$values | |||
) |
getOnDeleteProps | ( | $cascading | ) |
getPropsForCheckOptions | ( | ) |
Default is to check derived single value properties that are not readOnly
getPropsForRecurseCopy | ( | $fromProp = null | ) |
PntPropertyDescriptor | $fromProp | the property recursing from |
getSaveErrorMessages | ( | ) |
This method is called by ObjectSaveAction after the properties have been set and before save() is called. If the result of this method is not empty, save is not called and the error messages are set to the page forwarded to.
|
static |
getValueNoOptionErrorMessage | ( | $prop, | |
$value | |||
) |
getValueWithIdNoOptionErrorMessage | ( | $prop, | |
$id | |||
) |
& initFromData | ( | $assocArray, | |
& | $fieldMap | ||
) |
Initialize an existing object from an associative array retrieved from the datbase.
$assocArray | Associative Array with the columnNames as keys and the values as values |
$fieldMap | Associative Array with the fieldNames as keys and the corresponding columnNames as values |
initMissingFields | ( | & | $missingFieldsMap | ) |
initPropertyDescriptors | ( | ) |
isNew | ( | ) |
|
static |
Answer wheather the instances can be loaded from and stored in a database.
loadData | ( | $id | ) |
|
static |
pntDelete | ( | ) |
recurseCopyFrom | ( | $original, | |
$fromProp = null |
|||
) |
Copy values of multi value properties that are inCopy recursively. Do not copy values of other properties.
PntDbObject | $original | whose multi value properties values may be copied |
PntPropertyDescriptor | $fromProp | the property recursing from, or null if recursion starts here |
recurseDelete | ( | ) |
registerCopyFrom | ( | $original | ) |
save | ( | ) |
PntError |
$id = 0 |