src/Menu.php
public function run($config = [])
    {
        if (!is_array($config)) {
            $config = ['class' => $config];
        }
        $config = array_merge($this->widgetConfig, $config);
        if (!empty($config['options']) || !empty($this->options)) {
            $config['options'] = array_merge(
                isset($this->options) ? $this->options : [],
                isset($config['options']) ? $config['options'] : []
            );
        }
        $config['items'] = $this->getItems();

        return call_user_func([$config['class'], 'widget'], $config);
    }
public function run($config = [])
    {
        if (!is_array($config)) {
            $config = ['class' => $config];
        }
        $config = array_merge($this->widgetConfig, $config);
        if (!empty($config['options']) || !empty($this->options)) {
            $config['options'] = array_merge(
                isset($this->options) ? $this->options : [],
                isset($config['options']) ? $config['options'] : []
            );
        }
        $config['items'] = $this->getItems();

        return call_user_func([$config['class'], 'widget'], $config);
    }
public function run ( $ config = [ ] ) { if ( ! is_array ( $ config ) ) { $ config = [ 'class' => $ config ] ; } $ config = array_merge ( $ this -> widgetConfig , $ config ) ; if ( ! empty ( $ config [ 'options' ] ) || ! empty ( $ this -> options ) ) { $ config [ 'options' ] = array_merge ( isset ( $ this -> options ) ? $ this -> options : [ ] , isset ( $ config [ 'options' ] ) ? $ config [ 'options' ] : [ ] ) ; } $ config [ 'items' ] = $ this -> getItems ( ) ; return call_user_func ( [ $ config [ 'class' ] , 'widget' ] , $ config ) ; }
Renders menu widget with given config.
@param mixed $config
@return string rendered menu
Renders menu widget with given config .