Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 1598 | Revision 1659 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 1598 Revision 1657
Zeile 250... Zeile 250...
250
        }
250
        }
Zeile 251... Zeile 251...
251
 
251
 
252
        public function shopPosition(): Collection
252
        public function shopPosition(): Collection
253
        {
253
        {
254
            $pos = collect(); //$pos = "Sie sind hier: <a href=\"/\">Startseite</a> <span class='breadcrumb-trenner'> &raquo; </span>";
254
            $pos = collect(); //$pos = "Sie sind hier: <a href=\"/\">Startseite</a> <span class='breadcrumb-trenner'> &raquo; </span>";
255
            $path = $this->getPath_New( $_SESSION['navigation']['position'] );
255
            $path = getPath( $_SESSION['navigation']['position'] );
256
            foreach ( $path as $dir )
256
            foreach ( $path as $dir )
257
            {
257
            {
258
                $pos[] = $dir;
258
                $pos[] = $dir;
Zeile 259... Zeile 259...
259
            }
259
            }
260
 
260
 
Zeile 261... Zeile -...
261
            return $pos;
-
 
262
        }
-
 
263
 
-
 
264
        private function getPath_new( $root, $return_locked_folders = false ): Collection
-
 
265
        {
-
 
266
            $ini = $GLOBALS["INI"];
-
 
267
            $treeRoot = -1;
-
 
268
            if ( $ini["treeRoot"] )
-
 
269
            {
-
 
270
                $treeRoot = $ini["treeRoot"];
-
 
271
            }
-
 
272
 
-
 
273
            $path = collect();
-
 
274
            $father = $root;
-
 
275
            while ( $father != -1 && !is_null( $father ) )
-
 
276
            {
-
 
277
                $row = Directory::where( "id", $father )->whereIn( "status", [ 0, 2 ] )->firstOrFail();
-
 
278
                $father = $row->directory_id;
-
 
279
                $path[] = $row;
-
 
280
            }
-
 
281
            return $path->reverse();
261
            return $pos;