KWeb
6.4
|
Group of attributes. More...
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() |
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.
KWebAttribute_Table_Group::__construct | ( | $ | id, |
$ | title = false , |
||
array $ | options = array() |
||
) |
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
Reimplemented from KWebAttribute_Table.
KWebAttribute_Table_Group::addCSSClass | ( | $ | css | ) |
KWebAttribute_Table_Group::buildSubgroup | ( | $ | id | ) |
Creates a typicall subgroup for this 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 | ) |
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 | ( | ) |
Implements KWebAttribute_Interface.
KWebAttribute_Table_Group::getCSSClasses | ( | ) |
Implements KWebAttribute_Interface.
Reimplemented in KWebAttribute_Table_Form, and KWebAttribute_Table_Horizontal.
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!
KWebAttribute_Table_Group::getGroups | ( | ) |
Returns the list of subgroups in this group.
KWebAttribute_Table_Group::getTemplatePrinters | ( | ) |
Implements KWebAttribute_Interface.
Reimplemented in KWebAttribute_Table_Form, KWebAttribute_Table_Horizontal, and KWebAttribute_Table_Section.
KWebAttribute_Table_Group::getTitle | ( | ) |
Implements KWebAttribute_Interface.
KWebAttribute_Table_Group::isData | ( | ) |
Implements KWebAttribute_Interface.
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.
Reimplemented from KWebAttribute_Table.
KWebAttribute_Table_Group::rewind | ( | ) |
Reimplemented from KWebAttribute_Table.
KWebAttribute_Table_Group::valid | ( | ) |
Reimplemented from KWebAttribute_Table.
KWebAttribute_Table_Group::$css |
KWebAttribute_Table_Group::$groups = array() [protected] |
KWebAttribute_Table_Group::$id |
KWebAttribute_Table_Group::$more |
KWebAttribute_Table_Group::$options = array() |