public function setValue($value = null, $submittedValue = null)
    {
        if ($submittedValue !== null && $submittedValue === $value) {
            $this->setAttribute('selected');
        } else {
            $this->removeAttribute('selected');
        }

        if ($value === null) {
            //$value = $this->getKey();
        }

        $this->setAttribute('value', $value);
    }
public function setValue($value = null, $submittedValue = null)
    {
        if ($submittedValue !== null && $submittedValue === $value) {
            $this->setAttribute('selected');
        } else {
            $this->removeAttribute('selected');
        }

        if ($value === null) {
            //$value = $this->getKey();
        }

        $this->setAttribute('value', $value);
    }
public function setValue ( $ value = null , $ submittedValue = null ) { if ( $ submittedValue !== null && $ submittedValue === $ value ) { $ this -> setAttribute ( 'selected' ) ; } else { $ this -> removeAttribute ( 'selected' ) ; } if ( $ value === null ) { //$value = $this->getKey(); } $ this -> setAttribute ( 'value' , $ value ) ; }
Setter for value of this element.

@param string|null $value          The value to set, or NULL to use key as value
@param string|null $submittedValue The value which was submitted on last request, or NULL

@author Benjamin Carl <opensource@clickalicious.de>
Setter for value of this element .