public function actionIndex() { if ($this->path == '/') { $this->redirect(['/burivuh/main/index', 'path' => '']); } $folder = Folder::open($this->path); $readme = Document::read($this->path . '/README.md'); $breadcrumbs = Folder::pathToBreadcrumbs($this->path); if ($this->path == '') { $backDir = null; } else { $backDir = dirname($this->path); } if ($backDir == '/') { $backDir = ''; } var_dump($backDir); return $this->render('index', ['path' => $this->path, 'folder' => $folder, 'readme' => $readme, 'breadcrumbs' => $breadcrumbs, 'backDir' => $backDir]); }