protected function build_breadcrumb($path) {
        $breadcrumb = array(array(
            'name' => get_string('root', 'repository_filesystem'),
            'path' => $this->build_node_path('root')
        ));

        $crumbs = explode('|', $path);
        $trail = '';

        foreach ($crumbs as $crumb) {
            list($mode, $nodepath, $display) = $this->explode_node_path($crumb);
            switch ($mode) {
                case 'search':
                    $breadcrumb[] = array(
                        'name' => get_string('searchresults', 'repository_filesystem'),
                        'path' => $this->build_node_path($mode, $nodepath, $display, $trail),
                    );
                    break;

                case 'browse':
                    $breadcrumb[] = array(
                        'name' => $display,
                        'path' => $this->build_node_path($mode, $nodepath, $display, $trail),
                    );
                    break;
            }

            $lastcrumb = end($breadcrumb);
            $trail = $lastcrumb['path'];
        }

        return $breadcrumb;
    }
protected function build_breadcrumb($path) {
        $breadcrumb = array(array(
            'name' => get_string('root', 'repository_filesystem'),
            'path' => $this->build_node_path('root')
        ));

        $crumbs = explode('|', $path);
        $trail = '';

        foreach ($crumbs as $crumb) {
            list($mode, $nodepath, $display) = $this->explode_node_path($crumb);
            switch ($mode) {
                case 'search':
                    $breadcrumb[] = array(
                        'name' => get_string('searchresults', 'repository_filesystem'),
                        'path' => $this->build_node_path($mode, $nodepath, $display, $trail),
                    );
                    break;

                case 'browse':
                    $breadcrumb[] = array(
                        'name' => $display,
                        'path' => $this->build_node_path($mode, $nodepath, $display, $trail),
                    );
                    break;
            }

            $lastcrumb = end($breadcrumb);
            $trail = $lastcrumb['path'];
        }

        return $breadcrumb;
    }
protected function build_breadcrumb ( $ path ) { $ breadcrumb = array ( array ( 'name' => get_string ( 'root' , 'repository_filesystem' ) , 'path' => $ this -> build_node_path ( 'root' ) ) ) ; $ crumbs = explode ( '|' , $ path ) ; $ trail = '' ; foreach ( $ crumbs as $ crumb ) { list ( $ mode , $ nodepath , $ display ) = $ this -> explode_node_path ( $ crumb ) ; switch ( $ mode ) { case 'search' : $ breadcrumb [ ] = array ( 'name' => get_string ( 'searchresults' , 'repository_filesystem' ) , 'path' => $ this -> build_node_path ( $ mode , $ nodepath , $ display , $ trail ) , ) ; break ; case 'browse' : $ breadcrumb [ ] = array ( 'name' => $ display , 'path' => $ this -> build_node_path ( $ mode , $ nodepath , $ display , $ trail ) , ) ; break ; } $ lastcrumb = end ( $ breadcrumb ) ; $ trail = $ lastcrumb [ 'path' ] ; } return $ breadcrumb ; }
Build the breadcrumb from a full path.

@param string $path A path generated by {@link self::build_node_path()}.
@return array
Build the breadcrumb from a full path .