protected function prepareLinks()
    {
        $links = [];
        if ($this->homeLink === null) {
            $links[] = $this->renderItem([
                'label' => Yii::t('yii', 'Home'),
                'url' => Yii::$app->homeUrl,
            ], $this->itemTemplate);
        } elseif ($this->homeLink !== false) {
            $links[] = $this->renderItem($this->homeLink, $this->itemTemplate);
        }

        foreach ($this->links as $link) {
            if (!is_array($link)) {
                $link = ['label' => $link];
            }
            $links[] = $this->renderItem($link, isset($link['url']) ? $this->itemTemplate : $this->activeItemTemplate);
        }

        return $links;
    }
protected function prepareLinks()
    {
        $links = [];
        if ($this->homeLink === null) {
            $links[] = $this->renderItem([
                'label' => Yii::t('yii', 'Home'),
                'url' => Yii::$app->homeUrl,
            ], $this->itemTemplate);
        } elseif ($this->homeLink !== false) {
            $links[] = $this->renderItem($this->homeLink, $this->itemTemplate);
        }

        foreach ($this->links as $link) {
            if (!is_array($link)) {
                $link = ['label' => $link];
            }
            $links[] = $this->renderItem($link, isset($link['url']) ? $this->itemTemplate : $this->activeItemTemplate);
        }

        return $links;
    }
protected function prepareLinks ( ) { $ links = [ ] ; if ( $ this -> homeLink === null ) { $ links [ ] = $ this -> renderItem ( [ 'label' => Yii :: t ( 'yii' , 'Home' ) , 'url' => Yii :: $ app -> homeUrl , ] , $ this -> itemTemplate ) ; } elseif ( $ this -> homeLink !== false ) { $ links [ ] = $ this -> renderItem ( $ this -> homeLink , $ this -> itemTemplate ) ; } foreach ( $ this -> links as $ link ) { if ( ! is_array ( $ link ) ) { $ link = [ 'label' => $ link ] ; } $ links [ ] = $ this -> renderItem ( $ link , isset ( $ link [ 'url' ] ) ? $ this -> itemTemplate : $ this -> activeItemTemplate ) ; } return $ links ; }
Generates all breadcrumb links and sets active states.
@return array all processed items
@uses [[renderItem]]
@throws InvalidConfigException
Generates all breadcrumb links and sets active states .