Gui\Components\Radio::setOptions PHP Method

setOptions() public method

Sets the options
public setOptions ( array $options ) : self
$options array
return self
    public function setOptions(array $options)
    {
        foreach ($options as $key => $option) {
            if (!$option instanceof Option) {
                throw new \InvalidArgumentException('Element in array options must be an instance of Option');
            } else {
                $this->call('items.addObject', [$option->getLabel(), $option->getValue()]);
            }
        }
        return $this;
    }