public function getNavData()
    {
        $result = [];

        if ($this->menu->items)
        {
            foreach ($this->menu->items as $item)
            {
                $data = $this->getRecursiveData($item);
                if (!ArrayHelper::getValue($data, 'url') && ! ArrayHelper::getValue($data, 'items')) {

                } else {
                    $result[$item->id] = $data;
                }
            }
        }

        return $result;
    }
public function getNavData()
    {
        $result = [];

        if ($this->menu->items)
        {
            foreach ($this->menu->items as $item)
            {
                $data = $this->getRecursiveData($item);
                if (!ArrayHelper::getValue($data, 'url') && ! ArrayHelper::getValue($data, 'items')) {

                } else {
                    $result[$item->id] = $data;
                }
            }
        }

        return $result;
    }
public function getNavData ( ) { $ result = [ ] ; if ( $ this -> menu -> items ) { foreach ( $ this -> menu -> items as $ item ) { $ data = $ this -> getRecursiveData ( $ item ) ; if ( ! ArrayHelper :: getValue ( $ data , 'url' ) && ! ArrayHelper :: getValue ( $ data , 'items' ) ) { } else { $ result [ $ item -> id ] = $ data ; } } } return $ result ; }
Data to build the widget \yii\bootstrap\Nav

@return array
Data to build the widget \ yii \ bootstrap \ Nav