@@ -128,12 +128,20 @@ |
||
128 | 128 | $this->content[$this->_toolbarPosition]=$this->_toolbar; |
129 | 129 | } |
130 | 130 | |
131 | + /** |
|
132 | + * @param integer $index |
|
133 | + * @param string $title |
|
134 | + */ |
|
131 | 135 | public function addDividerBefore($index,$title){ |
132 | 136 | $index=$this->_getIndex($index); |
133 | 137 | $this->_instanceViewer->addHeaderDividerBefore($index, $title); |
134 | 138 | return $this; |
135 | 139 | } |
136 | 140 | |
141 | + /** |
|
142 | + * @param string $index |
|
143 | + * @param string $contentAfter |
|
144 | + */ |
|
137 | 145 | public function addWrapper($index,$contentBefore,$contentAfter=null){ |
138 | 146 | $index=$this->_getIndex($index); |
139 | 147 | $this->_instanceViewer->addWrapper($index, $contentBefore,$contentAfter); |
@@ -59,24 +59,26 @@ |
||
59 | 59 | foreach ($values as $v){ |
60 | 60 | $form->addField($v); |
61 | 61 | } |
62 | - }else{ |
|
62 | + } else{ |
|
63 | 63 | $separators[]=$count; |
64 | 64 | for($i=0;$i<$size;$i++){ |
65 | 65 | $wrapper=null; |
66 | 66 | $fields=\array_slice($values, $separators[$i]+1,$separators[$i+1]-$separators[$i]); |
67 | - if(isset($headers[$separators[$i]+1])) |
|
68 | - $form->addHeader($headers[$separators[$i]+1],4,true); |
|
67 | + if(isset($headers[$separators[$i]+1])) { |
|
68 | + $form->addHeader($headers[$separators[$i]+1],4,true); |
|
69 | + } |
|
69 | 70 | if(isset($wrappers[$separators[$i]+1])){ |
70 | 71 | $wrapper=$wrappers[$separators[$i]+1]; |
71 | 72 | } |
72 | 73 | //TODO check why $fields is empty |
73 | 74 | if(\sizeof($fields)===1){ |
74 | 75 | $added=$form->addField($fields[0]); |
75 | - }elseif(\sizeof($fields)>1){ |
|
76 | + } elseif(\sizeof($fields)>1){ |
|
76 | 77 | $added=$form->addFields($fields); |
77 | 78 | } |
78 | - if(isset($wrapper)) |
|
79 | - $added->wrap($wrapper[0],$wrapper[1]); |
|
79 | + if(isset($wrapper)) { |
|
80 | + $added->wrap($wrapper[0],$wrapper[1]); |
|
81 | + } |
|
80 | 82 | } |
81 | 83 | } |
82 | 84 | } |