+ static function climbtree($form, $tree, &$elements) {
+ foreach ($tree as $tagID => $varValue) {
+ $tagAttribute = array(
+ 'onclick' => "return changeRowColor(\"rowidtag_$tagID\")",
+ 'id' => "tag_{$tagID}",
+ );
+
+ $elements[$tagID] = $form->createElement('checkbox', $tagID, '', '', $tagAttribute);
+
+ if (array_key_exists('children', $varValue)) {
+ self::climbtree($form, $varValue['children'], $elements);
+ }
+ }
+ return $elements;
+ }
+