public function getBreadcrumbs($depth = 1, $glue = ' &raquo; ', $currCss = 'kv-crumb-active', $new = 'Untitled') {
        /**
         * @var Tree $this
         */
        if ($this->isNewRecord || empty($this)) {
            return $currCss ? Html::tag('span', $new, ['class' => $currCss]) : $new;
        }
        $depth = empty($depth) ? null : intval($depth);
        $module = Yii::$app->controller->module;
        $nameAttribute = ArrayHelper::getValue($module->dataStructure, 'nameAttribute', 'name');
        $crumbNodes = $depth === null ? $this->parents()->all() : $this->parents($depth - 1)->all();
        $crumbNodes[] = $this;
        $i = 1;
        $len = count($crumbNodes);
        $crumbs = [];
        foreach ($crumbNodes as $node) {
            $name = $node->$nameAttribute;
            if ($i === $len && $currCss) {
                $name = Html::tag('span', $name, ['class' => $currCss]);
            }
            $crumbs[] = $name;
            $i++;
        }
        return implode($glue, $crumbs);
    }
public function getBreadcrumbs($depth = 1, $glue = ' &raquo; ', $currCss = 'kv-crumb-active', $new = 'Untitled') {
        /**
         * @var Tree $this
         */
        if ($this->isNewRecord || empty($this)) {
            return $currCss ? Html::tag('span', $new, ['class' => $currCss]) : $new;
        }
        $depth = empty($depth) ? null : intval($depth);
        $module = Yii::$app->controller->module;
        $nameAttribute = ArrayHelper::getValue($module->dataStructure, 'nameAttribute', 'name');
        $crumbNodes = $depth === null ? $this->parents()->all() : $this->parents($depth - 1)->all();
        $crumbNodes[] = $this;
        $i = 1;
        $len = count($crumbNodes);
        $crumbs = [];
        foreach ($crumbNodes as $node) {
            $name = $node->$nameAttribute;
            if ($i === $len && $currCss) {
                $name = Html::tag('span', $name, ['class' => $currCss]);
            }
            $crumbs[] = $name;
            $i++;
        }
        return implode($glue, $crumbs);
    }
public function getBreadcrumbs ( $ depth = 1 , $ glue = ' &raquo; ' , $ currCss = 'kv-crumb-active' , $ new = 'Untitled' ) { /**
         * @var Tree $this
         */ if ( $ this -> isNewRecord || empty ( $ this ) ) { return $ currCss ? Html :: tag ( 'span' , $ new , [ 'class' => $ currCss ] ) : $ new ; } $ depth = empty ( $ depth ) ? null : intval ( $ depth ) ; $ module = Yii :: $ app -> controller -> module ; $ nameAttribute = ArrayHelper :: getValue ( $ module -> dataStructure , 'nameAttribute' , 'name' ) ; $ crumbNodes = $ depth === null ? $ this -> parents ( ) -> all ( ) : $ this -> parents ( $ depth - 1 ) -> all ( ) ; $ crumbNodes [ ] = $ this ; $ i = 1 ; $ len = count ( $ crumbNodes ) ; $ crumbs = [ ] ; foreach ( $ crumbNodes as $ node ) { $ name = $ node -> $ nameAttribute ; if ( $ i === $ len && $ currCss ) { $ name = Html :: tag ( 'span' , $ name , [ 'class' => $ currCss ] ) ; } $ crumbs [ ] = $ name ; $ i ++ ; } return implode ( $ glue , $ crumbs ) ; }
Generate and return the breadcrumbs for the node.

@param integer $depth   the breadcrumbs parent depth
@param string  $glue    the pattern to separate the breadcrumbs
@param string  $currCss the CSS class to be set for current node
@param string  $new     the name to be displayed for a new node

@return string the parsed breadcrumbs
Generate and return the breadcrumbs for the node .