コード例 #1
0
 public function fileAction($path)
 {
     $this->setPath($path);
     $dbfile = new DocBookFile($this->getPath());
     $tpl_params = array('page' => $dbfile->getDocBookFullStack(), 'breadcrumbs' => Helper::getBreadcrumbs($this->getPath()));
     $tpl_params['title'] = Helper::buildPageTitle($this->getPath());
     if (empty($tpl_params['title'])) {
         if (!empty($tpl_params['breadcrumbs'])) {
             $tpl_params['title'] = Helper::buildPageTitle(end($tpl_params['breadcrumbs']));
         } else {
             $tpl_params['title'] = _T('Home');
         }
     }
     $content = $dbfile->viewFileInfos();
     return array('default', $content, $tpl_params);
 }