widgets/Breadcrumbs.php
public function initItems()
    {
        if (!empty($this->items)) {
            $links = array();
            if ($this->homeLabel !== false) {
                $label         = $this->homeLabel !== null ? $this->homeLabel : Icon::icon(Enum::ICON_HOME);
                $links[$label] = array('href' => $this->homeUrl !== null ? $this->homeUrl : \Yii::app()->homeUrl);
            }

            foreach ($this->items as $label => $options) {
                if (is_string($label)) {
                    if ($this->encodeLabel)
                        $label = \CHtml::encode($label);
                    if (is_string($options))
                        $links[$label] = array('href' => \CHtml::normalizeUrl($options));
                    else {
                        $url             = ArrayHelper::removeValue($options, 'url', '');
                        $options['href'] = \CHtml::normalizeUrl($url);
                        $links[$label]   = $options;
                    }
                } else
                    $links[$options] = array('href' => '#');
            }
            $this->items = $links;
        }
    }
public function initItems()
    {
        if (!empty($this->items)) {
            $links = array();
            if ($this->homeLabel !== false) {
                $label         = $this->homeLabel !== null ? $this->homeLabel : Icon::icon(Enum::ICON_HOME);
                $links[$label] = array('href' => $this->homeUrl !== null ? $this->homeUrl : \Yii::app()->homeUrl);
            }

            foreach ($this->items as $label => $options) {
                if (is_string($label)) {
                    if ($this->encodeLabel)
                        $label = \CHtml::encode($label);
                    if (is_string($options))
                        $links[$label] = array('href' => \CHtml::normalizeUrl($options));
                    else {
                        $url             = ArrayHelper::removeValue($options, 'url', '');
                        $options['href'] = \CHtml::normalizeUrl($url);
                        $links[$label]   = $options;
                    }
                } else
                    $links[$options] = array('href' => '#');
            }
            $this->items = $links;
        }
    }
public function initItems ( ) { if ( ! empty ( $ this -> items ) ) { $ links = array ( ) ; if ( $ this -> homeLabel !== false ) { $ label = $ this -> homeLabel !== null ? $ this -> homeLabel : Icon :: icon ( Enum :: ICON_HOME ) ; $ links [ $ label ] = array ( 'href' => $ this -> homeUrl !== null ? $ this -> homeUrl : \ Yii :: app ( ) -> homeUrl ) ; } foreach ( $ this -> items as $ label => $ options ) { if ( is_string ( $ label ) ) { if ( $ this -> encodeLabel ) $ label = \ CHtml :: encode ( $ label ) ; if ( is_string ( $ options ) ) $ links [ $ label ] = array ( 'href' => \ CHtml :: normalizeUrl ( $ options ) ) ; else { $ url = ArrayHelper :: removeValue ( $ options , 'url' , '' ) ; $ options [ 'href' ] = \ CHtml :: normalizeUrl ( $ url ) ; $ links [ $ label ] = $ options ; } } else $ links [ $ options ] = array ( 'href' => '#' ) ; } $ this -> items = $ links ; } }
Initializes menu items
Initializes menu items