public function setRequired($required)
    {
        if ($required) {
            $this->setAttribute('required', 'required');
        } else {
            $this->removeAttribute('required');
        }
        return parent::setRequired($required);
    }
public function setRequired($required)
    {
        if ($required) {
            $this->setAttribute('required', 'required');
        } else {
            $this->removeAttribute('required');
        }
        return parent::setRequired($required);
    }
public function setRequired ( $ required ) { if ( $ required ) { $ this -> setAttribute ( 'required' , 'required' ) ; } else { $ this -> removeAttribute ( 'required' ) ; } return parent :: setRequired ( $ required ) ; }
Set whether the form element is required

@param  boolean $required
@return Select
Set whether the form element is required