public function setOptions($inputName, $data = [], $selected = null)
    {
        // Set opdations
        $this->setInputArgument($inputName, 'options', $data);

        // Set the value
        if (!is_null($selected)) {
            $this->setValue($inputName, $selected);
        }
    }
public function setOptions($inputName, $data = [], $selected = null)
    {
        // Set opdations
        $this->setInputArgument($inputName, 'options', $data);

        // Set the value
        if (!is_null($selected)) {
            $this->setValue($inputName, $selected);
        }
    }
public function setOptions ( $ inputName , $ data = [ ] , $ selected = null ) { // Set opdations $ this -> setInputArgument ( $ inputName , 'options' , $ data ) ; // Set the value if ( ! is_null ( $ selected ) ) { $ this -> setValue ( $ inputName , $ selected ) ; } }
Function used to set options of a select element. Shortcut for using
`setInputArgument` and `setValue`.

@param string $inputName The select name to add options to
@param array  $data      An array of `value => label` options
@param string $selected  The selected key

@return void
Function used to set options of a select element . Shortcut for using setInputArgument and setValue .