public function addElement( tao_helpers_form_FormElement $element, $isSystem = false)
    {

		$elementPosition = -1;
		foreach($this->elements as $i => $elt){
			if($elt->getName() == $element->getName()){
				$elementPosition = $i;
				break;
			}
		}

		if($elementPosition >= 0){
			$this->elements[$elementPosition] = $element;
		}else{
			$this->elements[] = $element;
		}

		if ($isSystem) {
		    $this->systemElements[] = $element->getName();
        }


    }
public function addElement( tao_helpers_form_FormElement $element, $isSystem = false)
    {

		$elementPosition = -1;
		foreach($this->elements as $i => $elt){
			if($elt->getName() == $element->getName()){
				$elementPosition = $i;
				break;
			}
		}

		if($elementPosition >= 0){
			$this->elements[$elementPosition] = $element;
		}else{
			$this->elements[] = $element;
		}

		if ($isSystem) {
		    $this->systemElements[] = $element->getName();
        }


    }
public function addElement ( tao_helpers_form_FormElement $ element , $ isSystem = false ) { $ elementPosition = - 1 ; foreach ( $ this -> elements as $ i => $ elt ) { if ( $ elt -> getName ( ) == $ element -> getName ( ) ) { $ elementPosition = $ i ; break ; } } if ( $ elementPosition >= 0 ) { $ this -> elements [ $ elementPosition ] = $ element ; } else { $ this -> elements [ ] = $ element ; } if ( $ isSystem ) { $ this -> systemElements [ ] = $ element -> getName ( ) ; } }
Add an element to the form

@access public
@author Cédric Alfonsi, <cedric.alfonsi@tudor.lu>
@param  tao_helpers_form_FormElement $element
@param bool|false $isSystem
Add an element to the form