@@ 161-176 (lines=16) @@ | ||
158 | * @param array $values |
|
159 | * @return HtmlCollection |
|
160 | */ |
|
161 | public function setPropertyValues($property,$values){ |
|
162 | $i=0; |
|
163 | if(\is_array($values)===false){ |
|
164 | $values=\array_fill(0, $this->count(),$values); |
|
165 | } |
|
166 | foreach ($values as $value){ |
|
167 | $c=$this->content[$i++]; |
|
168 | if(isset($c)){ |
|
169 | $c->setProperty($property,$value); |
|
170 | } |
|
171 | else{ |
|
172 | return $this; |
|
173 | } |
|
174 | } |
|
175 | return $this; |
|
176 | } |
|
177 | ||
178 | public function compile(JsUtils $js=NULL, &$view=NULL) { |
|
179 | $index=0; |
@@ 195-210 (lines=16) @@ | ||
192 | * @param array $values |
|
193 | * @return HtmlCollection |
|
194 | */ |
|
195 | public function setPropertyValues($property,$values){ |
|
196 | $i=0; |
|
197 | if(\is_array($values)===false){ |
|
198 | $values=\array_fill(0, $this->count(),$values); |
|
199 | } |
|
200 | foreach ($values as $value){ |
|
201 | $c=$this->items[$i++]; |
|
202 | if(isset($c)){ |
|
203 | $c->setProperty($property,$value); |
|
204 | } |
|
205 | else{ |
|
206 | return $this; |
|
207 | } |
|
208 | } |
|
209 | return $this; |
|
210 | } |
|
211 | ||
212 | public function getItem($index){ |
|
213 | return $this->items[$index]; |