KWeb  6.4
KWebAttribute_Table_Group Class Reference

Group of attributes. More...

Inheritance diagram for KWebAttribute_Table_Group:
KWebAttribute_Table KWebAttribute_Interface KWebAttribute_Table_Form KWebAttribute_Table_Horizontal KWebAttribute_Table_Section

Public Member Functions

 __construct ($id, $title=false, array $options=array())
 getAttributeId ()
 getAllAttributes ()
 Returns an array or iterator giving access to all attributes in this table.
 getTitle ()
 addCSSClass ($css)
 getCSSClasses ()
 getAttributeCSSClasses (KWebAttribute_Table_Form $form, KWebAttribute_Interface $attr)
 isData ()
 add (KWebAttribute_Interface $attribute, $pos=false, $insertAfter=false)
 Adds attribute to this group.
 get ($name)
 remove ($attributeOrPos, $recursive=true)
 Removes attribute from this, and sub groups.
 findAttribute ($attributeOrPos, &$group)
 Finds the specified attribute.
 getGroups ()
 Returns the list of subgroups in this group.
 getGroup ($name, $create=false)
 Returns specified subgroup, creates it if needed.
 buildSubgroup ($id)
 Creates a typicall subgroup for this group.
 current ()
 key ()
 next ()
 rewind ()
 valid ()
 offsetExists ($offset)
 getTemplatePrinters ()
 printTemplate ($view, KWebAttribute_Table_Form $form, KWebAttribute_Interface $attr, array $vars=array(), $skip=false)
 Prints the template for the CHILD attribute or group.
 printInForm (KWebAttribute_Table_Form $form, KWebAttribute_Table_Group $group, array $options=array())
 Prints the whole attribute/form/group - with label and widget...

Data Fields

 $options = array()
 $id
 $css
 $more

Protected Attributes

 $groups = array()

Detailed Description

Group of attributes.

Groups can be nested inside of each other, and can contain both KWebAttribute and KWebAttribute_Table_Group objects

It implements ArrayAccess and Iterator for quick access and traversal of attributes. Both interfaces will access the whole tree (so it's possible to use one foreach for the whole tree), however the Iterator will only iterate on KWebAttribute objects.


Constructor & Destructor Documentation

KWebAttribute_Table_Group::__construct ( id,
title = false,
array $  options = array() 
)

Member Function Documentation

KWebAttribute_Table_Group::add ( KWebAttribute_Interface attribute,
pos = false,
insertAfter = false 
)

Adds attribute to this group.

Returns THIS item for fluent interface. Subgroups are checked for duplicates! Adding existing item id, will replace this item in a subgroup. If you specify attribute id, or attribute object in $pos, the attribute will be added to the same subgroup, this attribute belongs to.

Use move() to move elements around

Returns:
KWebAttribute_Table

Reimplemented from KWebAttribute_Table.

KWebAttribute_Table_Group::addCSSClass ( css)
KWebAttribute_Table_Group::buildSubgroup ( id)

Creates a typicall subgroup for this group.

Returns:
KWebAttribute_Table_Group

Reimplemented in KWebAttribute_Table_Form, and KWebAttribute_Table_Section.

KWebAttribute_Table_Group::current ( )

Reimplemented from KWebAttribute_Table.

KWebAttribute_Table_Group::findAttribute ( attributeOrPos,
&$  group 
)

Finds the specified attribute.

KWebAttribute_Table_Group::get ( name)
Returns:
KWebAttribute returns attribute (or group!) of specified name

Reimplemented from KWebAttribute_Table.

KWebAttribute_Table_Group::getAllAttributes ( )

Returns an array or iterator giving access to all attributes in this table.

Reimplemented from KWebAttribute_Table.

KWebAttribute_Table_Group::getAttributeCSSClasses ( KWebAttribute_Table_Form form,
KWebAttribute_Interface attr 
)
KWebAttribute_Table_Group::getAttributeId ( )
KWebAttribute_Table_Group::getCSSClasses ( )
KWebAttribute_Table_Group::getGroup ( name,
create = false 
)

Returns specified subgroup, creates it if needed.

It is possible to get sub-sub groups using '.' as a name separator $table->getGroup('group.subgroup'); Remember, that every id in the tree has to be unique!

Returns:
KWebAttribute_Table_Group
KWebAttribute_Table_Group::getGroups ( )

Returns the list of subgroups in this group.

KWebAttribute_Table_Group::getTemplatePrinters ( )
KWebAttribute_Table_Group::getTitle ( )
KWebAttribute_Table_Group::isData ( )
KWebAttribute_Table_Group::key ( )

Reimplemented from KWebAttribute_Table.

KWebAttribute_Table_Group::next ( )

Reimplemented from KWebAttribute_Table.

KWebAttribute_Table_Group::offsetExists ( offset)

Reimplemented from KWebAttribute_Table.

KWebAttribute_Table_Group::printInForm ( KWebAttribute_Table_Form form,
KWebAttribute_Table_Group group,
array $  options = array() 
)

Prints the whole attribute/form/group - with label and widget...

Implements KWebAttribute_Interface.

KWebAttribute_Table_Group::printTemplate ( view,
KWebAttribute_Table_Form form,
KWebAttribute_Interface attr,
array $  vars = array(),
skip = false 
)

Prints the template for the CHILD attribute or group.

Only the form should call printTemplate on itself

KWebAttribute_Table_Group::remove ( attributeOrPos,
recursive = true 
)

Removes attribute from this, and sub groups.

Returns:
KWebAttribute returns removed attribute

Reimplemented from KWebAttribute_Table.

KWebAttribute_Table_Group::rewind ( )

Reimplemented from KWebAttribute_Table.

KWebAttribute_Table_Group::valid ( )

Reimplemented from KWebAttribute_Table.


Field Documentation

KWebAttribute_Table_Group::$css
KWebAttribute_Table_Group::$groups = array() [protected]
KWebAttribute_Table_Group::$id
KWebAttribute_Table_Group::$more
KWebAttribute_Table_Group::$options = array()

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