Core/Framework/Page/Body/Menu/MenuItem.php
public function setOption($option, $value = '')
    {
        if (is_array($option)) {
            foreach ($option as $key => $value) {
                $this->options[$key] = $value;
            }
        }
        else {
            $this->options[$option] = $value;
        }

        return $this;
    }
public function setOption($option, $value = '')
    {
        if (is_array($option)) {
            foreach ($option as $key => $value) {
                $this->options[$key] = $value;
            }
        }
        else {
            $this->options[$option] = $value;
        }

        return $this;
    }
public function setOption ( $ option , $ value = '' ) { if ( is_array ( $ option ) ) { foreach ( $ option as $ key => $ value ) { $ this -> options [ $ key ] = $ value ; } } else { $ this -> options [ $ option ] = $ value ; } return $ this ; }
Sets one or more options.

@param string|array $option
Name of option or assoc array of options.
@param mixed $value
Optional value when setting only one option.

@return MenuItem
Sets one or more options .