Lines Matching refs:pos

111      * @param int $pos
114 public function getElementAt($pos) argument
116 if ($pos < 0) $pos = count($this->elements) + $pos;
117 if ($pos < 0) $pos = 0;
118 if ($pos >= count($this->elements)) $pos = count($this->elements) - 1;
119 return $this->elements[$pos];
132 for ($pos = $offset; $pos < $len; $pos++) {
133 if ($this->elements[$pos]->getType() == $type) {
134 return $pos;
151 for ($pos = $offset; $pos < $len; $pos++) {
152 if ($this->elements[$pos]->attr($name) == $value) {
153 return $pos;
167 * @param int $pos 0-based position in the form, -1 for at the end
170 public function addElement(Element $element, $pos = -1) argument
175 if ($pos < 0) {
178 array_splice($this->elements, $pos, 0, array($element));
187 * @param int $pos 0-based position of the element to replace
189 public function replaceElement(Element $element, $pos) argument
194 array_splice($this->elements, $pos, 1, array($element));
200 * @param int $pos 0-based position of the element to remove
202 public function removeElement($pos) argument
204 array_splice($this->elements, $pos, 1);
216 * @param int $pos
219 public function addTextInput($name, $label = '', $pos = -1) argument
221 return $this->addElement(new InputElement('text', $name, $label), $pos);
229 * @param int $pos
232 public function addPasswordInput($name, $label = '', $pos = -1) argument
234 return $this->addElement(new InputElement('password', $name, $label), $pos);
242 * @param int $pos
245 public function addRadioButton($name, $label = '', $pos = -1) argument
247 return $this->addElement(new CheckableElement('radio', $name, $label), $pos);
255 * @param int $pos
258 public function addCheckbox($name, $label = '', $pos = -1) argument
260 return $this->addElement(new CheckableElement('checkbox', $name, $label), $pos);
269 * @param int $pos
272 public function addDropdown($name, $options, $label = '', $pos = -1) argument
274 return $this->addElement(new DropdownElement($name, $options, $label), $pos);
282 * @param int $pos
285 public function addTextarea($name, $label = '', $pos = -1) argument
287 return $this->addElement(new TextareaElement($name, $label), $pos);
295 * @param int $pos
298 public function addButton($name, $content, $pos = -1) argument
300 return $this->addElement(new ButtonElement($name, hsc($content)), $pos);
308 * @param int $pos
311 public function addButtonHTML($name, $html, $pos = -1) argument
313 return $this->addElement(new ButtonElement($name, $html), $pos);
321 * @param int $pos
324 public function addLabel($label, $for='', $pos = -1) argument
326 return $this->addLabelHTML(hsc($label), $for, $pos);
334 * @param int $pos
337 public function addLabelHTML($content, $for='', $pos = -1) argument
350 return $this->addElement($element, $pos);
357 * @param int $pos
360 public function addHTML($html, $pos = -1) argument
362 return $this->addElement(new HTMLElement($html), $pos);
369 * @param int $pos
372 public function addTag($tag, $pos = -1) argument
374 return $this->addElement(new TagElement($tag), $pos);
383 * @param int $pos
386 public function addTagOpen($tag, $pos = -1) argument
388 return $this->addElement(new TagOpenElement($tag), $pos);
397 * @param int $pos
400 public function addTagClose($tag, $pos = -1) argument
402 return $this->addElement(new TagCloseElement($tag), $pos);
409 * @param int $pos
412 public function addFieldsetOpen($legend = '', $pos = -1) argument
414 return $this->addElement(new FieldsetOpenElement($legend), $pos);
420 * @param int $pos
423 public function addFieldsetClose($pos = -1) argument
425 return $this->addElement(new FieldsetCloseElement(), $pos);
439 for ($pos = 0; $pos < $len; $pos++) {
440 $type = $this->elements[$pos]->getType();
444 $this->addFieldsetClose($pos);
445 $lastclose = $pos + 1;
446 $pos++;
456 $pos++;
458 $lastclose = $pos;