KWeb  6.4
KWebAttribute_ChildItems Class Reference
Inheritance diagram for KWebAttribute_ChildItems:
KWebAttribute KWebAttribute_Interface

Public Member Functions

 __construct ($title, $childTypes, $childAttrId, $opt=array())
 getType ()
 Zwraca nazwÄ™ typu .
 canView (KWebObject_Attributable $object)
 isData ()
 Return TRUE if this attribute is a data attribute.
 isDefaultAttrId ()
 getChildAttrId ()
 getChildTypes ()
 isChildTypeAllowed ($type)
 getAllAllowedTypes ($item=null)
 Returns a list of allowed types.
 checkValue (KWebObject_Attributable $object, &$value, $lang=false)
 Checks the value for correctness.
 getPostedData (KWebAttribute_Table_Form $form)
 Returns data posted in the form for this attribute (in FORMAT_FORM)
 getFormValue (KWebAttribute_Table_Form $form)
 Returns object's attribute value in FORMAT_FORM, or posted value directly.
 canTranslate ()
 onFormCreated (KWebAttribute_Table_Form $form)
 Called when form is created, and the data is attached to it.
 onFormPosted (KWebAttribute_Table_Form $form)
 Called from KWebAttribute_Table_Form::setPostedData Attribute can change the data on the form, but should not yet convert or validate it...
 storePostedFormData (KWebAttribute_Table_Form $form, $value)
 Stores attribute's data in the object...
 onFormPostStored (KWebAttribute_Table_Form $form, $success)
 Called from KWebAttribute_Table_Form::storePostedData, after successfully storing all the posted data.
 handleRemoteAction (KWebAttribute_Table_Form $form, KWebObject_Attributable $object, $action, $data)
 Handles remote action called on /object,view-attribute-action.

Data Fields

 $childTypes
 Allowed types as an array.
 $autoAdd = false
 One item will be always added in the editor.
 $hidden = false
 If TRUE, children won't show up on the edit page.
 $defaultAttrId = false
 TRUE if this attrId is default for specified item types.
 $_subforms = array()
 Forms with child items.

Protected Member Functions

 buildChildItem (KWebItem $parentItem, $type)
 buildSubForm (KWebAttribute_Table_Form $form, $index, KWebItem $editItem)

Protected Attributes

 $childAttrId

Constructor & Destructor Documentation

KWebAttribute_ChildItems::__construct ( title,
childTypes,
childAttrId,
opt = array() 
)

Member Function Documentation

KWebAttribute_ChildItems::buildChildItem ( KWebItem parentItem,
type 
) [protected]
Returns:
KWebItem
KWebAttribute_ChildItems::buildSubForm ( KWebAttribute_Table_Form form,
index,
KWebItem editItem 
) [protected]
KWebAttribute_ChildItems::canTranslate ( )

Reimplemented from KWebAttribute.

KWebAttribute_ChildItems::canView ( KWebObject_Attributable object)

Reimplemented from KWebAttribute.

KWebAttribute_ChildItems::checkValue ( KWebObject_Attributable object,
&$  value,
lang = false 
)

Checks the value for correctness.

Value is in FORMAT_INTERNAL. In case of severe problem, an Exception may be thrown Value may be altered if necessary

Returns:
TRUE if the value is ok

Reimplemented from KWebAttribute.

KWebAttribute_ChildItems::getAllAllowedTypes ( item = null)

Returns a list of allowed types.

If item is provided, it will be checked for access rights

KWebAttribute_ChildItems::getChildAttrId ( )
KWebAttribute_ChildItems::getChildTypes ( )
KWebAttribute_ChildItems::getFormValue ( KWebAttribute_Table_Form form)

Returns object's attribute value in FORMAT_FORM, or posted value directly.

Returns:
value in FORMAT_FORM

Reimplemented from KWebAttribute.

KWebAttribute_ChildItems::getPostedData ( KWebAttribute_Table_Form form)

Returns data posted in the form for this attribute (in FORMAT_FORM)

Reimplemented from KWebAttribute.

KWebAttribute_ChildItems::getType ( )

Zwraca nazwÄ™ typu .

Reimplemented from KWebAttribute.

KWebAttribute_ChildItems::handleRemoteAction ( KWebAttribute_Table_Form form,
KWebObject_Attributable object,
action,
data 
)

Handles remote action called on /object,view-attribute-action.

Reimplemented from KWebAttribute.

KWebAttribute_ChildItems::isChildTypeAllowed ( type)
KWebAttribute_ChildItems::isData ( )

Return TRUE if this attribute is a data attribute.

Reimplemented from KWebAttribute.

KWebAttribute_ChildItems::isDefaultAttrId ( )
KWebAttribute_ChildItems::onFormCreated ( KWebAttribute_Table_Form form)

Called when form is created, and the data is attached to it.

Regardles of data post

Reimplemented from KWebAttribute.

KWebAttribute_ChildItems::onFormPosted ( KWebAttribute_Table_Form form)

Called from KWebAttribute_Table_Form::setPostedData Attribute can change the data on the form, but should not yet convert or validate it...

In case of error, an Exception should be thrown

Returns:
FALSE to skip this attribute from form processing, TRUE to include it in conversion->validation phase

Reimplemented from KWebAttribute.

KWebAttribute_ChildItems::onFormPostStored ( KWebAttribute_Table_Form form,
success 
)

Called from KWebAttribute_Table_Form::storePostedData, after successfully storing all the posted data.

Reimplemented from KWebAttribute.

KWebAttribute_ChildItems::storePostedFormData ( KWebAttribute_Table_Form form,
value 
)

Stores attribute's data in the object...

Data is already validated and converted to FORMAT_INTERNAL. This function is called for EVERY attribute with an id, even those, that were not posted.

You should check if it is posted ($form->isAttributedPosted()), and act accordingly.

Data is in FORMAT_INTERNAL

Reimplemented from KWebAttribute.


Field Documentation

KWebAttribute_ChildItems::$_subforms = array()

Forms with child items.

KWebAttribute_ChildItems::$autoAdd = false

One item will be always added in the editor.

KWebAttribute_ChildItems::$childAttrId [protected]
KWebAttribute_ChildItems::$childTypes

Allowed types as an array.

KWebAttribute_ChildItems::$defaultAttrId = false

TRUE if this attrId is default for specified item types.

KWebAttribute_ChildItems::$hidden = false

If TRUE, children won't show up on the edit page.


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