Nette\Forms\Controls\MultiSelectBox::getControl PHP Method

getControl() public method

Generates control's HTML element.
public getControl ( ) : Nette\Utils\Html
return Nette\Utils\Html
    public function getControl()
    {
        $items = [];
        foreach ($this->options as $key => $value) {
            $items[is_array($value) ? $this->translate($key) : $key] = $this->translate($value);
        }
        return Nette\Forms\Helpers::createSelectBox($items, ['selected?' => $this->value, 'disabled:' => is_array($this->disabled) ? $this->disabled : NULL] + $this->optionAttributes)->addAttributes(parent::getControl()->attrs)->multiple(TRUE);
    }