public function setChoices($choices)
    {
        if (func_num_args() > 1) {
            $choices = func_get_args();
        }

        $this->choices = [];
        return $this->addChoices($choices);
    }
public function setChoices($choices)
    {
        if (func_num_args() > 1) {
            $choices = func_get_args();
        }

        $this->choices = [];
        return $this->addChoices($choices);
    }
public function setChoices ( $ choices ) { if ( func_num_args ( ) > 1 ) { $ choices = func_get_args ( ) ; } $ this -> choices = [ ] ; return $ this -> addChoices ( $ choices ) ; }
Discards existing choices and adds multiple choices.
Also accepts multiple arguments, one for each choice.
@param array $choices Can be an array of key values ['choice' => 'label']
@return $this
Discards existing choices and adds multiple choices . Also accepts multiple arguments one for each choice .